VSCode-Bedrock-Development-Extension icon indicating copy to clipboard operation
VSCode-Bedrock-Development-Extension copied to clipboard

Extension ignores settings and mcproject files like .mcignore, .mcdefinitions and .mcattributes

Open xmas-dev opened this issue 2 years ago • 18 comments

Hi,

For a long time now, I've been having a lot of trouble filtering certain files and folders from diagnostics. This issue has had a long history for me (I've previously reported it here and here) and I was hoping for a final 'master' fix.

Currently, as of v7.0.2, here's what I experience:

  • Some extension settings (In VS Code: Right Click Extension > Extension Settings) are respected, but others are not.
  • All .mcignore .mcattributes and .mcdefinitions files are ignored.
  • The Json UI schemas seem to be missing some definitions? and so just flags everything I work on (example in images below).

Additional context:

  • The extension settings that do work seem to be the ones diagnosing mcfunction files (don't get errors/warnings about missing scoreboard objectives) but ones affecting JSON don't seem to work.
  • I'm using a multi-root workspace with .mcignore .mcattributes,.mcdefinitions files in each root folder (automatically generated by extension's MCProject command)
  • Some of the root folders are named differently from their name on disk (the workspace file lets you do this)
  • Some of the root folders are Junctions like the ones talked about here.
  • My workspace is loaded from a saved workspace file which is stored in a subdirectory under one of the roots above.
  • Currently on VS Code v1.83.1 but this has been happening for a long time now.

I've been ignoring the issue for a while but recently, while working on json-ui, the diagnoser just seems to flag everything it sees, ruining the experience. I understand the extension doesn't support syntax for experimental MC features and sometimes the schemas tend to be outdated, but I would really appreciate a way to turn off the linting on unsupported files. Maybe even a comment like Typescript's // @ts-ignore to suppress specific errors?

Reference Screenshots:

  • Multi-root workspace setup. Folders named differently from disk. image
  • Location of workspace file. image
  • Examples of files generated by MCProject command. image
  • Example of one such .mcignore file. image
  • Example of that .mcignore file not working. image
  • Extension settings being ignored image
  • Example of diagnoser going crazy on json-ui files. image

Thank you :)

xmas-dev avatar Oct 26 '23 06:10 xmas-dev

Has the UI thing been resolved? It should be just packaged within the extension. Might indicate an extension that's corrupted. Possibly best to remove that extension, and the folder in the .vscode

DaanV2 avatar Oct 29 '23 14:10 DaanV2

For the .mcignore not working, I'm wondering something.

It might be that a top-level project is loading in everything. The plugin doesn't support Minecraft project files in subfolders atm.

So each workspace might be working as intended but an upper level level workspace is loading all

DaanV2 avatar Oct 29 '23 14:10 DaanV2

Has the UI thing been resolved? It should be just packaged within the extension. Might indicate an extension that's corrupted. Possibly best to remove that extension, and the folder in the .vscode

Tried uninstalling all bedrock-related extensions and deleting any traces from that folder. On re-install the issue still persist unfortunately. Can you check if the schemas in the latest extension have the 'CAE_variables' being referenced by the error (last screenshot).

So each workspace might be working as intended but an upper level level workspace is loading all

I think this is probably the case. That top root folder named 'Bedrock Library' in Screenshot#1 has a bunch of addons in various subfolders. Is there a way to keep that in my workspace but make the extension ignore it? (would like to keep it for easy reference).

Additionally, let me know if there's any test or logging you would like me to run on my workspace to diagnose this. If projects in subfolders are the issue, would you consider adding support for that in future? Or maybe just a way to ignore it.

I will test my workspace with root folders added and removed and let you know if anything changes.

xmas-dev avatar Oct 29 '23 15:10 xmas-dev

Think to stop the root folder from checking all, you would have to add a pattern to the .mcignore of the root to not go deeper

DaanV2 avatar Oct 29 '23 18:10 DaanV2

Tried uninstalling all bedrock-related extensions and deleting any traces from that folder. On re-install the issue still persist unfortunately. Can you check if the schemas in the latest extension have the 'CAE_variables' being referenced by the error (last screenshot).

Think I have fixed this

DaanV2 avatar Oct 31 '23 07:10 DaanV2

Sorry, but the UI schema issue still exists in version 7.0.3. image

Additionally, I tried removing every root folder in my workspace except one, and it has zero addons in subdirectories, it's just the vanilla BP from Microsoft. And .mcignore files still don't work in this setup :( image image

xmas-dev avatar Nov 01 '23 07:11 xmas-dev

I tried again, opening a completely new window, adding just the vanilla BP folder with the .mcignore file and even this doesn't work. It's not even a saved workspace, just a new window with nothing but the vanilla BP opened. The extension just refuses to respect .mcignore files at all. Should be very easy to reproduce.

https://github.com/Blockception/VSCode-Bedrock-Development-Extension/assets/117382404/d5c780a4-aaa1-4290-9675-dd4220133fdc

xmas-dev avatar Nov 01 '23 07:11 xmas-dev

A more comprehensive video with voice-over providing as much context as possible: https://www.youtube.com/watch?v=HTfvEtjTUQs

Hope this helps :)

xmas-dev avatar Nov 01 '23 13:11 xmas-dev

Sorry, but the UI schema issue still exists in version 7.0.3. image

Additionally, I tried removing every root folder in my workspace except one, and it has zero addons in subdirectories, it's just the vanilla BP from Microsoft. And .mcignore files still don't work in this setup :( image image

That errors, which is a json errors. Cannot be ignored through mcignore, its just a thing vscode does

DaanV2 avatar Nov 01 '23 19:11 DaanV2

That errors, which is a json errors. Cannot be ignored through mcignore, its just a thing vscode does

No, because that is valid JSON syntax. Also, the errors go away when the extension is disabled.

https://github.com/Blockception/VSCode-Bedrock-Development-Extension/assets/117382404/3c7d8dca-35bd-46b9-a5fa-ce581e9007ad

xmas-dev avatar Nov 01 '23 20:11 xmas-dev

That errors, which is a json errors. Cannot be ignored through mcignore, its just a thing vscode does

No, because that is valid JSON syntax. Also, the errors go away when the extension is disabled.

2023-11-02.01-35-21.1.mp4

Doesn't matter the extension cannot ignore json through mcignore

DaanV2 avatar Nov 01 '23 20:11 DaanV2

Doesn't matter the extension cannot ignore json through mcignore

Yeah, I was referring to the part where you said it's just a thing VS code does. Can this be disabled through extension settings then?

xmas-dev avatar Nov 01 '23 20:11 xmas-dev

Doesn't matter the extension cannot ignore json through mcignore

Yeah, I was referring to the part where you said it's just a thing VS code does. Can this be disabled through extension settings then?

Also no sadly, vscode would require a couple more features

DaanV2 avatar Nov 01 '23 20:11 DaanV2

Oh, okay thanks for trying 👍 Were you able to reproduce the UI schema issues on your end? Is that a result of incomplete schema or something else?

xmas-dev avatar Nov 01 '23 20:11 xmas-dev

Oh, okay thanks for trying 👍 Were you able to reproduce the UI schema issues on your end? Is that a result of incomplete schema or something else?

Think I really really fixed it now, version 7.0.4 is uploading

DaanV2 avatar Nov 01 '23 20:11 DaanV2

So CAE_Variables is fixed but now this shows: image

From what I recall there were only like a handful of missing definitions, so fixing it shouldn't be too difficult I hope. 🤞

xmas-dev avatar Nov 02 '23 00:11 xmas-dev

Hey, just got back to working on addons and noticed the UI errors have gone away. Nice! Have we concluded that there's nothing we can change about how the extension highlights schema mismatches in files tracked by .mcignore? Even when all diagnostics are disabled in extension settings?

xmas-dev avatar Nov 12 '23 07:11 xmas-dev

If its a thing about json structure, I cannot do anything

DaanV2 avatar Nov 12 '23 11:11 DaanV2