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

Building the manual requires building all of Nix #8518

Open
fricklerhandwerk opened this issue Jun 14, 2023 · 7 comments
Open

Building the manual requires building all of Nix #8518

fricklerhandwerk opened this issue Jun 14, 2023 · 7 comments
Labels
contributor-experience Developer experience for Nix contributors documentation

Comments

@fricklerhandwerk
Copy link
Contributor

Problem

The build process for the manual is both cognitively involved and technically bottle-necked on first building the Nix binary. That is quite some overhead in terms of contributor onboarding time and turnaround, especially when jumping between PRs.

Proposal

Splice out the parts that dump the JSON with CLI definitions to be built separately just for the manual. Remove those hidden helper commands from the Nix binaries.

Priorities

Add 👍 to issues you find important.

@thufschmitt
Copy link
Member

Splice out the parts that dump the JSON with CLI definitions to be built separately just for the manual

That looks very hard to do without significantly refactor the codebase (I mean, we could do it somewhat easily, but these parts would still depend on most of the codebase, so it wouldn't be useful at all). Still valuable, but by no mean an easy task.

@fricklerhandwerk fricklerhandwerk moved this to ⏰ Postponed in Nix documentation Jun 16, 2023
@fricklerhandwerk
Copy link
Contributor Author

  • @edolstra: not in favor of this
    • sounds like large refactoring
    • would break separation of concerns if CLI and builtins were defined in an independent component
  • @roberth: could do a light version. the goal is to improve the rebuild time
    • @edolstra: could do that directly. once did an experiment concatenating all source files and compiling without optimisation, which was a lot faster
      • this could work for just rendering the manual
  • @Ericson2314: it's problematic that the same Nix code is processing the markdown outside and inside the executable
    • would be better if markdown is processed once before the build, and imported in to the executable
    • @fricklerhandwerk: agreed, removing that spaghetti would ease contributions
    • @roberth: there should be a way without a lot of code changes
  • @roberth and @fricklerhandwerk will look into this

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-16-nix-team-meeting-minutes-63/29316/1

@fricklerhandwerk
Copy link
Contributor Author

Discussed in the Nix team meeting:

  • @roberth came up with a very non-invasive change, but still stuck on some linker issues
    • essentially building intermediate results as separate derivations
    • doesn't remove the complexity of the existing solution though
    • would be nice to have separate derivations for individual libraries
    • current approach adds some incrementaly at low cost, and is opt-in

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-30-nix-team-meeting-minutes-67/29835/1

@fricklerhandwerk fricklerhandwerk moved this from 🏁 Assigned to ⏰ Postponed in Nix team Oct 9, 2023
@thufschmitt thufschmitt removed this from Nix team Feb 28, 2024
@fricklerhandwerk
Copy link
Contributor Author

Related: #9817

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-06-05-nix-team-meeting-minutes-150/46583/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor-experience Developer experience for Nix contributors documentation
Projects
None yet
Development

No branches or pull requests

4 participants