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

Ninja output is very noisy #11841

Open
edolstra opened this issue Nov 8, 2024 · 8 comments
Open

Ninja output is very noisy #11841

edolstra opened this issue Nov 8, 2024 · 8 comments
Labels
contributor-experience Developer experience for Nix contributors

Comments

@edolstra
Copy link
Member

edolstra commented Nov 8, 2024

Describe the bug

Ninja generates a lot of output even when nothing has changed:

# ninja
# ninja | wc -l
1027

log.txt

It's unclear why src/external-api-docs/external-api-docs is being regenerated when there are no changes, but in any case it shouldn't barf out 1000+ lines of irrelevant warnings. Ideally, ninja should print nothing if there are no changes.

This is especially bad developer experience when there are things to recompile, and you have to search for the error messages buried beneath all the other stuff.

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

nix-env --version output

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

@edolstra edolstra added the bug label Nov 8, 2024
@Ericson2314
Copy link
Member

Is the problem here just

  • doxygen being too loud, and
  • doxygen alawys re-running

(both of which I agree are bad) or something else?

@edolstra
Copy link
Member Author

edolstra commented Nov 8, 2024

Other issues:

  • ninja install prints out thousands of lines related to installing the docs and other files:
[398/399] Installing files.
Installing subdir /home/eelco/Dev/nix-master/build/src/nix-manual/manual to /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/manual
Installing /home/eelco/Dev/nix-master/build/src/nix-manual/manual/redirects.js to /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/manual
...
Installing src/nix/nix to /home/eelco/Dev/nix-master/outputs/out/bin
Installing /home/eelco/Dev/nix-master/build/src/internal-api-docs/html/structnix_1_1BuiltPathBuilt-members.html to /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/internal-api/html
Installing /home/eelco/Dev/nix-master/build/src/internal-api-docs/html/structnix_1_1StreamToSourceAdapter.png to /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/internal-api/html
Installing /home/eelco/Dev/nix-master/build/src/internal-api-docs/html/structnix_1_1Installable.html to /home/eelco/Dev/nix-master/outputs/out/share/doc/nix/internal-api/html
...
  • There are some 150 steps related to the manpages:
[263/399] Generating src/nix-manual/manual with a custom command (wrapped by meson because command contains newlines, to set env)
[264/399] Generating src/nix-manual/nix-env-delete-generations.1 with a custom command
[265/399] Generating src/nix-manual/nix-env-install.1 with a custom command
[266/399] Generating src/nix-manual/nix-env-list-generations.1 with a custom command
[267/399] Generating src/nix-manual/nix-env-rollback.1 with a custom command
...
[391/399] Generating src/nix-manual/nix-hash.1 with a custom command
[392/399] Generating src/nix-manual/nix.conf.5 with a custom command

These get triggered for every C++ source change.

@edolstra edolstra added contributor-experience Developer experience for Nix contributors and removed bug labels Nov 8, 2024
@Mic92
Copy link
Member

Mic92 commented Nov 11, 2024

@edolstra are you running nix in a non-interactive terminal? Because for me the each of these progress lines gets deleted if progress is updated. In my local development it's actually the make version that produces significant more output because it doesn't override the old output.

@Mic92
Copy link
Member

Mic92 commented Nov 11, 2024

Here you can see that ninja output is just one line where as make prints a lot of stuff:

Screenshot_20241111_142437

edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Nov 12, 2024
@edolstra
Copy link
Member Author

@edolstra are you running nix in a non-interactive terminal?

Yes, in an interactive terminal ninja install still prints about 3800 "Installing" lines.

@Mic92
Copy link
Member

Mic92 commented Nov 12, 2024

MESON_INSTALL_QUIET=1 ninja install or ninja && meson install --quiet

Or if you want it super quiet for emacs:

MESON_INSTALL_QUIET=1 ninja install --quiet

@Mic92
Copy link
Member

Mic92 commented Nov 12, 2024

edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Nov 12, 2024
@edolstra
Copy link
Member Author

Thanks! Maybe we should set MESON_INSTALL_QUIET=1 in the dev shell by default.

edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Nov 12, 2024
The API docs build is extremely noisy (NixOS#11841) and probably not many
people care about it anyway. Also, they get rebuild on *every* ninja
invocation which is generally a waste of time.

Of course, you can still build the docs via `nix build
.#nix-{internal,external}-api-docs`, which is pretty fast.
edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Nov 12, 2024
The API docs build is extremely noisy (NixOS#11841) and probably not many
people care about it anyway. Also, they get rebuild on *every* ninja
invocation which is generally a waste of time.

Of course, you can still build the docs via `nix build
.#nix-{internal,external}-api-docs`, which is pretty fast.
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
Projects
None yet
Development

No branches or pull requests

3 participants