zeroc-ice / vscode-slice

Slice syntax highlighter for Visual Studio Code
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Remove Readonly Slice Directory Step from Packaging Process #32

Closed InsertCreativityHere closed 5 months ago

InsertCreativityHere commented 6 months ago

Currently, when we package the extension, one of the steps we run is:

"make-readonly": "echo \"Making /slice readonly for distribution\" && chmod -R a-w ./slice"

This command causes the packaging script to fail on Windows, where chmod isn't a thing. This is the only thing preventing the script from working on Windows. So, I propose removing it, to make it possible to package and test on any platform.

Additionally, I don't think it's useful. Most users wouldn't edit these files anyways, and if for some reason someone actually wants to edit them, this is going to do very little to stop them. More importantly, why should we care? In VSCode, you can "Jump to Definition" into the Rust source and edit that just fine.

ReeceHumphreys commented 6 months ago

Additionally, I don't think it's useful. Most users wouldn't edit these files anyways, and if for some reason someone actually wants to edit them, this is going to do very little to stop them. More importantly, why should we care? In VSCode, you can "Jump to Definition" into the Rust source and edit that just fine.

I just did some testing; they are doing the same defense as us. If you open a rust source code file for, say, format! and introduce a bunch of syntax errors, somehow nothing propagates to the user's project, and the building works just fine. The opened file may be a special preview, a temporary file, or something that cannot be edited. This is what we want at the end of the day.

Changing the files to read-only is another way to achieve the same result as Rust Analyzer. This was just a temporary hack solution to achieve the goal. I definitely would be open to a better solution, though!

InsertCreativityHere commented 5 months ago

I don't actually have a problem with making them readonly, my real gripe was that the packaging script just fails on Windows.

So, instead of actually removing this step, I updated our packaging scripts to be cross-platform. See #52. If everyone is okay with that PR, I'll just close this issue.

InsertCreativityHere commented 5 months ago

This was 'fixed' in #52.