Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include shell source and build source directories in proc.Spawn #102

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

Parzival-3141
Copy link
Collaborator

Closes #89
Closes #88
Closes #66

Live editing is here!
One small footgun: until #69 is completed any errors produced by build in proc.Spawn won't be reported to the user.

I needed to make some changes to initdata for #89, and in the process
made it simpler. Now the list of files is in one place, and we always
embed them into the bootloader. However, for debug builds we default
to embedding just the filepaths instead of their contents,
and fetching them at runtime. You still have the option of embedding
the file contents by setting the `PROD` environment variable.
This supports previous behavior while simplifying the codepaths.
…ctories

Closes #88
Closes #89

I though it was a bit silly casting `s.fsys` everywhere,
so I modifed `fs.go` to store the `watchfs` seperately.

There was also an issue in `wasm.js:writeSync()` where it would be passed
a null value for `buf` after the build tool finished in `proc.go:Spawn()`.
I added a catch-all fix, but perhaps its a bug that the null is passed in the
first place.

There's still some kinks to work out before you can edit the shell seamlessly,
namely using better heuristics for when files should be updated/rebuilt. We can use
mtime/ctime for those.
…`initfs`

Closes #66

Enables proper live editing within Wanix! `proc.Spawn` will rebuild commands
from source if it's been modified, and `kernel.fs` will copy in `initfs` files
if they've been modified externally *(note this will overwrite local files
inside Wanix)*.
@progrium progrium merged commit 214113a into main Feb 8, 2024
@Parzival-3141 Parzival-3141 deleted the shell-by-source branch March 4, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants