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

Fix project not found when project.godot file is excluded #635

Merged
merged 3 commits into from
Apr 6, 2024

Conversation

InfiniteXyy
Copy link
Contributor

@InfiniteXyy InfiniteXyy commented Mar 31, 2024

Fix a problem that when project.godot is excluded in VSCode, get_project_version function will always return undefined

How to reproduce:

  1. Add project.godot into vscode settings
    image
  2. Run open workspace with Godot Editor

There will be an error popup that the current workspace is not a godot project

There is a simple fix:

The findFiles api support taking a null value in the second parameter, then it will not take any exclusion from user config.

https://code.visualstudio.com/api/references/vscode-api

@DaelonSuzuka
Copy link
Collaborator

Why on earth would you want to exclude the extremely important project.godot?

@Calinou Calinou added the bug label Apr 2, 2024
@InfiniteXyy
Copy link
Contributor Author

Why on earth would you want to exclude the extremely important project.godot?

Hello, when I first tried godot, I didn't know what project.godot did. I thought that it was a program-generated file.

Therefore, I excluded them and only keeps the gd files.

I did something wrong, but the plugin keeps reporting meaningless errors, and I don't know what happens.

I think it should be a bug, even the user exclude the project file, the plugin should read the hidden files (maybe for some personal preference or just because unfamiliar with Godot)

@atirut-w
Copy link

atirut-w commented Apr 3, 2024

Wouldn't a better choice be disabling that popup with its explicitly excluded?

@InfiniteXyy
Copy link
Contributor Author

In TypeScript project, when I exclude the tsconfig.json, the ts plugin is still able to detect and use that config file.

I think here files.exclude only means not showing in the tree structure

@DaelonSuzuka DaelonSuzuka merged commit a9508d9 into godotengine:master Apr 6, 2024
4 checks passed
@DaelonSuzuka
Copy link
Collaborator

Thanks for submitting a fix for this, @InfiniteXyy.

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

Successfully merging this pull request may close these issues.

4 participants