Skip to content

fix(ci): include rust-src in flake.nix#6107

Closed
michaelfortunato wants to merge 1 commit intotypst:mainfrom
michaelfortunato:main
Closed

fix(ci): include rust-src in flake.nix#6107
michaelfortunato wants to merge 1 commit intotypst:mainfrom
michaelfortunato:main

Conversation

@michaelfortunato
Copy link
Contributor

rust-src was not available in the flake.nix, breaking rust-analyzer when using nix develop.
I tried to capture the before and after here, but the red squiggly lines did not show up, you will notice that I cannot do lsp actions before and then can after.
https://asciinema.org/a/XzG8hoWcLV5NLPSkIgKGSo80i
Fixes #6105

Copy link
Contributor

@PgBiel PgBiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll note that the dev shell is mostly just there to make it easier to get the recommended tooling versions going on your machine, but in principle this should be handled in your own dev environment. Though I am not strictly opposed to adding this if others see value in it. cc @drupol

Comment on lines +32 to +36
rust-toolchain = fenix.packages.${system}.combine [
(fenix.packages.${system}.fromManifestFile
rust-manifest).defaultToolchain
(fenix.packages.${system}.fromManifestFile rust-manifest).rust-src
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be added here, as it is not needed to build Typst. Only the development shell could depend on rust-src if it is decided that way.

Copy link
Contributor Author

@michaelfortunato michaelfortunato Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof yes my bad. And yeah, worth emphasizing again that adding rust-src in the devshell increases startup time noticeably.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the price to pay to have a reproducible dev environment.

@laurmaedje laurmaedje added the devops Packaging, CI, etc. label Apr 2, 2025
@laurmaedje
Copy link
Member

And yeah, worth emphasizing again that adding rust-src in the devshell increases startup time noticeably.

Maybe not worth it then?

@laurmaedje laurmaedje added the waiting-on-author Pull request waits on author label Apr 7, 2025
@michaelfortunato
Copy link
Contributor Author

michaelfortunato commented May 12, 2025

I can't reproduce this issue any longer on main . Closing it. Sorry for the noise. Thanks for engaging with me.

@PgBiel PgBiel mentioned this pull request Dec 2, 2025
@laurmaedje laurmaedje removed the waiting-on-author Pull request waits on author label Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops Packaging, CI, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rust analyzer does not work in nix flake based development

4 participants