Skip to content

Conversation

@dolmen
Copy link
Member

@dolmen dolmen commented Jul 2, 2025

Replace the use of "go run" with an internal implementation.

Demo:

$ ./goeval 'os.Exit(1+rand.Intn(255))' ; echo $?
196
$ ./goeval 'os.Exit(1+rand.Intn(255))' ; echo $?
106

Closes #9.

dolmen added 2 commits July 1, 2025 15:00
Stop using "go run" to compile and execute the user's code as well as
our capsules (sub/). Instead, call "go build" and then launch the binary.
This allows:
- proper exit status code
- no "exit status #" display
- no conflict with 'go' command arguments parsing
- no artificial import of "os" in the program

Closes #9.
@dolmen dolmen merged commit 38efacc into master Jul 2, 2025
2 checks passed
@dolmen dolmen deleted the internal-gorun branch July 2, 2025 16:46
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.

Replace "go run" by an embedded version

2 participants