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

Change Makefile to ensure that ALL first-party crates are singletons in the grub-isofiles image #262

Closed
kevinaboos opened this issue Apr 5, 2020 · 0 comments · Fixed by #327
Assignees

Comments

@kevinaboos
Copy link
Member

Problem

Right now there is no guarantee that the most recent incremental build of a given Theseus crate will actually be used in the ISO image. It's quite likely, but not guaranteed (except for the hacky way that it's ensured for the captain).

The cause of this was that initially I wasn't sure how to accommodate the legal possibility that multiple versions of the same crate (e.g, log v.0.3.7 and log v4.0.0) can simultaneously exist in the compiled OS image. This must be allowed, since different crates (third-party crates) might depend on different versions of a given crate.

You can observe this when editing an application and rebuilding Theseus incrementally (without doing a clean) -- sometimes the new version of the application will not make it into the ISO image, but the older

Solution

ALL first-party Theseus crates (our crates implemented in kernel/, applications/, and perhaps libs/ must be singletons. There is no valid case in which there are multiple "versions" of one of our own crates existing in the final ISO image.
Third-party crates (our dependencies from crates.io or Github, etc) are not required to be singletons in the ISO image.

This probably also requires changes to the grub_cg_generation tool as well.

@kevinaboos kevinaboos self-assigned this Apr 5, 2020
kevinaboos added a commit that referenced this issue Nov 11, 2020
* Incremental builds now work properly regardless of what versions are checked out or what configuration options may change in between builds.

* Create new build tool `copy_latest_crate_objects` which determines singleton kernel/app crates from cargo's target build directory, and copies them over to the OS image 
modules folder.  

* Remove `check_captain` target from Makefile, which is no longer necessary.

* Clear out `OBJECT_FILES_BUILD_DIR` (the `modules` folder) on each build to avoid bloat in OS image.
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 a pull request may close this issue.

1 participant