-
Notifications
You must be signed in to change notification settings - Fork 801
native modules: build rust workspace crates through the repo flake #3770
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
Open
jeff-hykin
wants to merge
22
commits into
main
Choose a base branch
from
jeff/fix/native_build_cargo_path
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
5241122
native_module: put ~/.cargo/bin on the auto-build PATH when cargo is …
jeff-hykin 112c9d5
Revert "native_module: put ~/.cargo/bin on the auto-build PATH when c…
jeff-hykin 0d216be
native modules: build the rust workspace crates through the repo flake
jeff-hykin 4cd942a
Merge remote-tracking branch 'origin/main' into _flake_work
jeff-hykin 6ab3467
native modules: keep build_command a literal for the publish gate
jeff-hykin 7a4f671
native modules: drop the build_command comments
jeff-hykin e4eb3f8
Point rust nix shells at a tiny toolchain flake
jeff-hykin 12c5ae2
Build the rust native modules with a nix derivation
jeff-hykin ac844e9
Merge remote-tracking branch 'origin/main' into jeff/fix/native_build…
jeff-hykin 6d274a2
Update the workspace cargoHash for main's Cargo.lock bump
jeff-hykin 8a9dc1a
Let each native module declare its own build inputs
jeff-hykin d08156f
Find the native module deps.nix files instead of listing them
jeff-hykin d06824e
Vendor the rust workspace from Cargo.lock instead of an aggregate hash
jeff-hykin 7d19b37
Revert "Vendor the rust workspace from Cargo.lock instead of an aggre…
jeff-hykin 5def8fd
Record why cargoLock.lockFile cannot replace the aggregate hash
jeff-hykin 7ea8f45
Merge remote-tracking branch 'origin/main' into jeff/fix/native_build…
jeff-hykin 701453c
Re-paste cargoHash for the Cargo.lock main brought in
jeff-hykin 8b4e3fa
Build native modules with crate2nix instead of one cargoHash
jeff-hykin c70d595
Build the example native modules too
jeff-hykin 3f6653f
Stop committing crate-hashes.json
jeff-hykin 776cb45
Pin cargo, not just crate2nix, when regenerating Cargo.nix
jeff-hykin 0e1d204
Describe crate-config.nix as the placeholder it actually is
jeff-hykin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -31,7 +31,7 @@ class MLSPlannerNativeConfig(NativeModuleConfig): | |||||
| cwd: str | None = "rust" | ||||||
| # The crate is a workspace member, so cargo builds into the repo-root target dir. | ||||||
| executable: str = str(DIMOS_PROJECT_ROOT / "target" / "release" / "mls_planner") | ||||||
| build_command: str | None = "cargo build --release" | ||||||
| build_command: str | None = "nix develop path:../../../../.. -c cargo build --release" | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| stdin_config: bool = True | ||||||
|
|
||||||
| world_frame: str = "odom" | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if we use path that will cause the entire workspace to get snapshotted on every build, can you double check this isn't going to spam the nix store?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I'm afraid this is looking like a "pick your poison" kinda decision. I've got a couple ideas but I'm gonna have to do testing.