Blockception/VSCode-Bedrock-Development-Extension

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

xmas-dev opened this issue ยท 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 :)

DaanV2 commented

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 commented

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

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.

DaanV2 commented

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 commented

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

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

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.

2023-11-01.13-01-08.mp4

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

Hope this helps :)

DaanV2 commented

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

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
DaanV2 commented

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

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?

DaanV2 commented

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

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?

DaanV2 commented

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

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. ๐Ÿคž

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?

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