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

Read global ratoml before first config query #17712

Open
alibektas opened this issue Jul 26, 2024 · 1 comment
Open

Read global ratoml before first config query #17712

alibektas opened this issue Jul 26, 2024 · 1 comment
Assignees

Comments

@alibektas
Copy link
Member

          Given https://github.com/rust-lang/rust-analyzer/pull/17246, it's still not being read early enough -- there is a pretty big chicken/egg problem with configs like this:
[workspace.discoverConfig]
...

We don't read rust-analyzer.toml until workspaces have already been discovered (to find the root), and we can't discover a workspace because haven't read it. I think we need to search upwards from the current working directory to find a rust-analyzer.toml to use on startup.

For rust-analyzer.toml users, these configs will never be populated in src/bin/main.rs:

if config.discover_workspace_config().is_none()
&& !config.has_linked_projects()
&& config.detached_files().is_empty()
{
config.rediscover_workspaces();
}

Originally posted by @cormacrelf in #17661 (comment)

@alibektas alibektas self-assigned this Jul 26, 2024
@alibektas
Copy link
Member Author

This will be waiting for #17537 to be implemented first, as it has a certain relevance in terms of project discovery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant