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

xtask lsp: add HUBRIS_TASK environment variable #1875

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

cbiffle
Copy link
Collaborator

@cbiffle cbiffle commented Sep 20, 2024

Setting HUBRIS_TASK causes xtask lsp to only search tasks of a specific name, across configured apps (either the default set, or the one chosen by HUBRIS_APP).

This can be useful to get the cfgs right for a specific case.

// Try to be specific about the error condition.
let apps = preferred_apps.join(", ");
if let Some(taskname) = preferred_task {
Err(anyhow!("task {taskname} not found or {package_name} is not used; \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: bail!(...) is incrementally shorter than Err(anyhow!(...))

Setting HUBRIS_TASK causes xtask lsp to only search tasks of a specific
name, across configured apps (either the default set, or the one chosen
by HUBRIS_APP).

This can be useful to get the cfgs right for a specific case.
@cbiffle cbiffle enabled auto-merge (rebase) October 10, 2024 19:09
@cbiffle cbiffle merged commit f432ac5 into master Oct 10, 2024
106 checks passed
@cbiffle cbiffle deleted the cbiffle/xtask-lsp-task-name branch October 10, 2024 19:12
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

Successfully merging this pull request may close these issues.

2 participants