Skip to content

Ignore tests/pos-with-compiler-cc/dotc in VS Code search #17619

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

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

mbovel
Copy link
Member

@mbovel mbovel commented May 30, 2023

Since the addition of tests/pos-with-compiler-cc/dotc, I often lost time ending up in a tests/pos-with-compiler-cc/dotc file instead of the expected compiler/src/dotty/tools/dotc equivalent. I also often saw other contributors experiencing the same problem during sprees.

To solve this, I propose to exclude tests/pos-with-compiler-cc/dotc files from VS Code search by adding it to search.exclude list setting.

Before:

image

After:

image

Note that to also exclude these files from full-text search, you also need to make sure this mysterious thing is checked:

image

See also: https://stackoverflow.com/questions/29971600/choose-folders-to-be-ignored-during-search-in-vs-code.

@mbovel mbovel requested a review from odersky May 30, 2023 12:39
@ckipp01
Copy link
Member

ckipp01 commented May 30, 2023

I'm not a VS Code user, so ignore me if the answer is obvious 😆, but I see we also have https://github.com/lampepfl/dotty/blob/main/.vscode-template/settings.json. Could these be combined, or is there a reason we need the .vscode-template and the .vscode settings?

@mbovel
Copy link
Member Author

mbovel commented May 30, 2023

Oh, I didn't know about this. This folder is copied to .vscode by SBT if it doesn't exist:

https://github.com/lampepfl/dotty/blob/28915c4bd20182486b3e11136cf79af516da23b0/project/Build.scala#L226-L227

I find it a fragile approach because:

  1. it means newcomers should run SBT before opening the project,
  2. if we add settings there, like this PR does, they will not apply to existing installations.

I think we should just commit .vscode directly like it's commonly done.

@mbovel mbovel force-pushed the mb/vscode-settings branch from 5962aca to d2cd59a Compare June 1, 2023 12:52
@mbovel mbovel changed the title Add .vscode/settings.json Ignore tests/pos-with-compiler-cc/dotc in VS Code search Jun 1, 2023
@mbovel
Copy link
Member Author

mbovel commented Jun 1, 2023

Okay, for now I just updated .vscode-template/settings.json instead of committing .vscode/settings.json.

Copy link
Member

@ckipp01 ckipp01 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 defer to the VS Code users, but if you see this biting people, then is makes sense imo. LGTM

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Yes, I think that PR a good idea

@mbovel mbovel merged commit c47f7e0 into scala:main Jun 2, 2023
@mbovel mbovel deleted the mb/vscode-settings branch June 2, 2023 09:08
Kordyjan added a commit that referenced this pull request Nov 21, 2023
…o LTS (#18970)

Backports #17619 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
@Kordyjan Kordyjan added this to the 3.3.2 milestone Dec 14, 2023
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.

4 participants