ion issueshttps://gitlab.redox-os.org/redox-os/ion/-/issues2018-06-12T14:22:05Zhttps://gitlab.redox-os.org/redox-os/ion/-/issues/231Refactoring Plans2018-06-12T14:22:05ZMichael Aaron Murphymmstick@pm.meRefactoring PlansI think it'd be best if we separated builtins from existing modules and placed them into their own `builtins` module. No need to have them embedded within existing structures. Perhaps one file per builtin command.
In addition, the `Co...I think it'd be best if we separated builtins from existing modules and placed them into their own `builtins` module. No need to have them embedded within existing structures. Perhaps one file per builtin command.
In addition, the `Command` structure in the main source file should also go into the `builtin` module and perhaps have it's name changed from `Command` to `Builtin`, as these commands are built in. To do this, the `Shell` structure and all of it's methods would have to be separated into it's own `shell` module too.
Finally, it's probably best if the builtins are statically generated at compile time, instead of regenerating them each time a command is evaluated.
### Refactor Shell/Command Structures
- [x] Shell -> shell.rs
- [x] Command -> builtin/mod.rs
- [x] Split Flow Control Logic Into Flow Logic Module
### Builtins Refactoring Progress
- [x] alias
- [x] unalias
- [x] let
- [x] drop
- [x] export
- [ ] cd
- [ ] dirs
- [ ] pushd
- [ ] popd
- [ ] read
- [ ] exit
- [ ] history
- [x] source
- [ ] true
- [ ] false
- [ ] helphttps://gitlab.redox-os.org/redox-os/ion/-/issues/299use HISTFILE instead of HISTORY_FILE2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meuse HISTFILE instead of HISTORY_FILE*Created by: mallochine*
There's probably some context I'm missing here, but shouldn't the shell be using "HISTFILE" instead of "HISTORY_FILE"? HISTFILE is the standard bash variable:
https://www.gnu.org/software/bash/manual/html_nod...*Created by: mallochine*
There's probably some context I'm missing here, but shouldn't the shell be using "HISTFILE" instead of "HISTORY_FILE"? HISTFILE is the standard bash variable:
https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.htmlhttps://gitlab.redox-os.org/redox-os/ion/-/issues/337Move `calc` logic to a separate crate2018-06-12T14:22:03ZMichael Aaron Murphymmstick@pm.meMove `calc` logic to a separate crate*Created by: huntergoldstein*
# Pros
* Permits faster iteration and more experimentation
* Sufficiently decouples the current `calc` monolith from the rest of `ion`
* Allows other applications to easily make use of `calc`'s logic
...*Created by: huntergoldstein*
# Pros
* Permits faster iteration and more experimentation
* Sufficiently decouples the current `calc` monolith from the rest of `ion`
* Allows other applications to easily make use of `calc`'s logic
# Cons
* Adds another dependency
* Version differences may cause incompatibilities (for example if some byte sequence is always special in `ion` but is used for a particular purpose in `calc`)https://gitlab.redox-os.org/redox-os/ion/-/issues/378Refactor Job Control2018-06-18T16:32:11ZMichael Aaron Murphymmstick@pm.meRefactor Job ControlThe job control portions of the codebase are in a bit of a mess right now, so I think it's pretty important that we spend time refactoring it to increase maintainability in the future.
- [x] Forking
- [x] Signals
- [ ] Background M...The job control portions of the codebase are in a bit of a mess right now, so I think it's pretty important that we spend time refactoring it to increase maintainability in the future.
- [x] Forking
- [x] Signals
- [ ] Background Managementhttps://gitlab.redox-os.org/redox-os/ion/-/issues/463Move `shell::signals` and `shell::pipe::crossplat` to `sys`2018-06-12T14:22:02ZMichael Aaron Murphymmstick@pm.meMove `shell::signals` and `shell::pipe::crossplat` to `sys`*Created by: huntergoldstein*
Keeping all of the platform specific stuff under the `sys` module would be neater than having it spread around the project.*Created by: huntergoldstein*
Keeping all of the platform specific stuff under the `sys` module would be neater than having it spread around the project.https://gitlab.redox-os.org/redox-os/ion/-/issues/833HISTORY_TIMESTAMP = 1 messes up history scrolling2019-04-02T17:00:03ZthedukeHISTORY_TIMESTAMP = 1 messes up history scrollingWith `let HISTORY_TIMESTAMP = 1`, browsing the history does not work correctly.
It will show a history entry for each timestamp instead of skipping those lines in the history file.With `let HISTORY_TIMESTAMP = 1`, browsing the history does not work correctly.
It will show a history entry for each timestamp instead of skipping those lines in the history file.https://gitlab.redox-os.org/redox-os/ion/-/issues/844Out of bounds panics on map assignments2019-02-24T01:28:33ZNagy Tiborxnagytibor@gmail.comOut of bounds panics on map assignmentsStacktraces and repros looks similar, so I grouped them together.
**Reproduction #1**:
```
let map['='] = '='
```
Panics with: `thread 'main' panicked at 'byte index 9 is out of bounds of "'] = '='"', src/libcore/str/mod.rs:2027:9`
<d...Stacktraces and repros looks similar, so I grouped them together.
**Reproduction #1**:
```
let map['='] = '='
```
Panics with: `thread 'main' panicked at 'byte index 9 is out of bounds of "'] = '='"', src/libcore/str/mod.rs:2027:9`
<details>
<summary>Stacktrace</summary>
<pre>
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:478
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
6: rust_begin_unwind
at src/libstd/panicking.rs:312
7: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
8: core::str::slice_error_fail
at src/libcore/str/mod.rs:0
9: core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index::{{closure}}
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libcore/str/mod.rs:1768
10: <core::option::Option<T>>::unwrap_or_else
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libcore/option.rs:386
11: core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::Range<usize>>::index
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libcore/str/mod.rs:1768
12: core::str::traits::<impl core::ops::index::Index<I> for str>::index
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libcore/str/mod.rs:1633
13: <ion_lexers::arguments::ArgumentSplitter<'a> as core::iter::iterator::Iterator>::next
at members/lexers/src/arguments.rs:148
14: <ion_shell::parser::assignments::actions::AssignmentActions<'a> as core::iter::iterator::Iterator>::next
at src/lib/parser/assignments/actions.rs:79
15: <ion_shell::shell::Shell as ion_shell::shell::assignments::VariableStore>::local
at src/lib/shell/assignments.rs:167
16: <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::execute_statement
at src/lib/shell/flow.rs:181
17: <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::on_command
at src/lib/shell/flow.rs:491
18: ion_shell::shell::binary::terminate::terminate_script_quotes
at /home/tibor/git/ion/src/lib/shell/binary/terminate.rs:37
19: <ion_shell::shell::Shell as ion_shell::shell::binary::Binary>::terminate_script_quotes
at /home/tibor/git/ion/src/lib/shell/binary/mod.rs:165
20: ion_shell::shell::Shell::execute_script
at /home/tibor/git/ion/src/lib/shell/mod.rs:207
21: ion::main
at src/main.rs:54
22: std::rt::lang_start::{{closure}}
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libstd/rt.rs:64
23: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
24: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:92
25: std::rt::lang_start_internal
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
26: std::rt::lang_start
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libstd/rt.rs:64
27: main
28: __libc_start_main
29: _start
</pre>
</details>
<br>
**Reproduction #2**:
```
let map[=]
```
Panics with: `thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 4', members/lexers/src/assignments/keys.rs:67:16`
<details>
<summary>Stacktrace</summary>
<pre>
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:70
2: std::panicking::default_hook::{{closure}}
at src/libstd/sys_common/backtrace.rs:58
at src/libstd/panicking.rs:200
3: std::panicking::default_hook
at src/libstd/panicking.rs:215
4: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:478
5: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:385
6: rust_begin_unwind
at src/libstd/panicking.rs:312
7: core::panicking::panic_fmt
at src/libcore/panicking.rs:85
8: core::panicking::panic_bounds_check
at src/libcore/panicking.rs:61
9: ion_lexers::assignments::keys::KeyIterator::parse_array
at members/lexers/src/assignments/keys.rs:67
10: <ion_lexers::assignments::keys::KeyIterator<'a> as core::iter::iterator::Iterator>::next
at members/lexers/src/assignments/keys.rs:153
11: <ion_shell::parser::assignments::actions::AssignmentActions<'a> as core::iter::iterator::Iterator>::next
at src/lib/parser/assignments/actions.rs:78
12: <ion_shell::shell::Shell as ion_shell::shell::assignments::VariableStore>::local
at src/lib/shell/assignments.rs:167
13: <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::execute_statement
at src/lib/shell/flow.rs:181
14: <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::on_command
at src/lib/shell/flow.rs:491
15: ion_shell::shell::binary::terminate::terminate_script_quotes
at /home/tibor/git/ion/src/lib/shell/binary/terminate.rs:37
16: <ion_shell::shell::Shell as ion_shell::shell::binary::Binary>::terminate_script_quotes
at /home/tibor/git/ion/src/lib/shell/binary/mod.rs:165
17: ion_shell::shell::Shell::execute_script
at /home/tibor/git/ion/src/lib/shell/mod.rs:207
18: ion::main
at src/main.rs:54
19: std::rt::lang_start::{{closure}}
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libstd/rt.rs:64
20: std::panicking::try::do_call
at src/libstd/rt.rs:49
at src/libstd/panicking.rs:297
21: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:92
22: std::rt::lang_start_internal
at src/libstd/panicking.rs:276
at src/libstd/panic.rs:388
at src/libstd/rt.rs:48
23: std::rt::lang_start
at /rustc/4c2be9c97fb60a01c545b8e8fa61e4247ae5c9b2/src/libstd/rt.rs:64
24: main
25: __libc_start_main
26: _start
</pre>
</details>
<br>
**Build information**:
`rustc -V`: rustc 1.33.0-nightly (4c2be9c97 2019-01-22)
`git rev-parse HEAD`: 918e1fc427e9700eb1d11c121544ac8f7c497972https://gitlab.redox-os.org/redox-os/ion/-/issues/893Failed running Ion with AlpineLinux2021-06-01T17:24:11ZNiklas Rosencrantzniklasr@protonmail.comFailed running Ion with AlpineLinuxI tried building it in a dockerized AlpineLinux. It did build the target but there is an error message when I tried to execute commands (echo $0, pwd, ls...). I can try again with some other Linux but my first attempt with Alpine failed.I tried building it in a dockerized AlpineLinux. It did build the target but there is an error message when I tried to execute commands (echo $0, pwd, ls...). I can try again with some other Linux but my first attempt with Alpine failed.Ion Shell v1.0.0beta