Skip to content

Conversation

@Jonstep101010
Copy link
Owner

@Jonstep101010 Jonstep101010 commented Jan 29, 2025

  • replaced almost all unsafe raw ptr usage
  • a few tests for tokenization
  • impl for shell and token
  • reduce manual iteration
  • use more rusty types
  • rustyline
  • remove custom unsafe code libs/interface to gnu_readline_sys
  • restructured modules

…tion

Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
@Jonstep101010 Jonstep101010 linked an issue Jan 29, 2025 that may be closed by this pull request
3 tasks
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
Signed-off-by: jschwabe <mail@jschwabe.site>
@Jonstep101010 Jonstep101010 force-pushed the 8-migrate-tokenization branch from 27608fd to 656016c Compare January 29, 2025 19:56
@Jonstep101010 Jonstep101010 requested a review from Copilot January 29, 2025 20:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 26 out of 41 changed files in this pull request and generated 2 comments.

Files not reviewed (15)
  • src/execution.rs: Evaluated as low risk
  • src/environment/expander.rs: Evaluated as low risk
  • src/builtins/exit.rs: Evaluated as low risk
  • src/builtins/export.rs: Evaluated as low risk
  • src/builtins/unset.rs: Evaluated as low risk
  • src/environment.rs: Evaluated as low risk
  • src/environment/check_key.rs: Evaluated as low risk
  • src/builtins/echo.rs: Evaluated as low risk
  • src/execution/builtins/pwd.rs: Evaluated as low risk
  • src/execution/builtins/env.rs: Evaluated as low risk
  • src/execution/execute_pipes.rs: Evaluated as low risk
  • src/execution/builtins/cd.rs: Evaluated as low risk
  • Cargo.toml: Evaluated as low risk
  • src/environment/mod.rs: Evaluated as low risk
  • src/execution/exec_bin.rs: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/execution/builtins/exit.rs:5

  • The error message 'exit: numeric argument required' should be printed when the argument is not a valid number, not when it is empty.
eprint_msh!("exit: numeric argument required");

src/execution/builtins/export.rs:16

  • [nitpick] The error message could be more specific. Consider including the invalid key in the error message.
crate::eprint_msh!("export: `{}': not a valid identifier", command[i].to_str().unwrap());

src/execution/builtins/unset.rs:3

  • The loop condition str[i] != b'\0' can lead to out-of-bounds access if the input slice does not contain a null terminator. Consider adding a bounds check.
while str[i] != b'\0' {

@Jonstep101010 Jonstep101010 force-pushed the 8-migrate-tokenization branch 3 times, most recently from 1311375 to 1fb8580 Compare January 29, 2025 20:36
Signed-off-by: jschwabe <mail@jschwabe.site>
@Jonstep101010 Jonstep101010 force-pushed the 8-migrate-tokenization branch from 1fb8580 to b1ecd98 Compare January 29, 2025 20:38
@Jonstep101010 Jonstep101010 merged commit 3caeaa0 into main Jan 29, 2025
1 check passed
@Jonstep101010 Jonstep101010 deleted the 8-migrate-tokenization branch January 29, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate entire tokenization to use rust types

1 participant