Skip to content

build(nix): create variant launch files #107

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

Merged
merged 24 commits into from
Apr 23, 2025
Merged

Conversation

quantum9Innovation
Copy link
Member

@quantum9Innovation quantum9Innovation commented Oct 20, 2024

This PR adds three variant launch files intended for testing a Nix migration in production:

  • vehicle-nix-test runs all nodes that are confirmed to work locally with the Nix build system defined in https://github.com/ArcturusNavigation/arcturus_nix/
  • vehicle-nix runs an additional node that should work on the robot, but will produce errors if run locally
  • vehicle-non-nix should be run in parallel with vehicle-nix on the robot; it runs all nodes that do not run with the current Nix build infrastructure

@quantum9Innovation quantum9Innovation added the build Updates to dependency specifications and build/install procedures label Oct 20, 2024
@quantum9Innovation quantum9Innovation self-assigned this Oct 20, 2024
@toyat522
Copy link
Contributor

what if we create a branch called nix-build (or something like that) and that can be for nix builds. Theoretically, nothing should conflict, so we can just git pull origin main from nix-build when we want the latest code on nix-build. Then, you can push your nix-specific stuff to this branch, occasionally pulling from main.

@quantum9Innovation
Copy link
Member Author

what if we create a branch called nix-build (or something like that) and that can be for nix builds. Theoretically, nothing should conflict, so we can just git pull origin main from nix-build when we want the latest code on nix-build. Then, you can push your nix-specific stuff to this branch, occasionally pulling from main.

Sounds good; the only issue would be that it might get a bit annoying to constantly merge the latest changes onto this branch. The Nix build files can actually be recreated with a simple command from the package.xml declarations, but the idea is to (eventually) switch to a Nix-based dependency management system (not that people would be forced to use this, but rather that it would act as an alternate dependency specification that is more complete/robust than the ROS package manifests), so the Nix package files should be an integral part of the codebase. Currently, however, it would not be entirely possible to build the entire project with Nix in a completely reproducible way, so I can just include a step in the Nix build process that rebuilds these files.

If you think this wouldn't disrupt the codebase at all, I think the best option would be to merge into main. Otherwise, if this might introduce too much confusion/technical debt, you can just close this PR and the arcturus-nix setup will still work fine.

@quantum9Innovation
Copy link
Member Author

Wait nvm this is the PR for creating variant launch files, not package declarations. These files cannot be auto-generated, so the two options would be to keep this on a separate branch or merge into main. I would prefer merging into main, but this might add additional confusion and duplicate code, so if you think it would be better to put this on a separate branch for now, that's fine as well.

@quantum9Innovation quantum9Innovation added this to the Roboboat 2025 milestone Feb 2, 2025
@quantum9Innovation
Copy link
Member Author

@toyat522 @wellscrosby @JanelleCai ready for review; this doesn't change any of the main codebase but adds continuous integration using the Nix build system to check that every commit to main does not break any of the modules (can be extended to include more complex tests later). This PR also adds new launch files for testing purposes (doesn't affect existing launch files) and a pre commit hook for Nix users (shouldn't affect Docker workflow).

@quantum9Innovation quantum9Innovation force-pushed the q9i/nix-launch branch 2 times, most recently from 7dc5e05 to b220bf3 Compare April 4, 2025 00:22
@quantum9Innovation quantum9Innovation requested review from pliam1105 and removed request for toyat522 and wellscrosby April 7, 2025 19:13
@quantum9Innovation quantum9Innovation merged commit 036745d into main Apr 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Updates to dependency specifications and build/install procedures
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants