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

Changes in any file starting with underscore triggers recompilation of all files #17

Open
sKopheK opened this issue Jan 19, 2021 · 12 comments
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@sKopheK
Copy link

sKopheK commented Jan 19, 2021

...even when the file starting with underscore is not imported to any SCSS file, its changes trigger recomplication of all SCSS files

  1. turn watch on, open output tab
  2. create file _x.scss
  3. edit and save the file
  4. output window prints out
Change detected...
_x.scss
--------------------
Compiling Sass/Scss Files: 
...
@sKopheK sKopheK changed the title Changes in any file with underscore triggers recompilation of all files Changes in any file starting with underscore triggers recompilation of all files Jan 19, 2021
@glenn2223 glenn2223 added enhancement New feature or request wontfix This will not be worked on labels Jan 19, 2021
@glenn2223
Copy link
Owner

glenn2223 commented Jan 19, 2021

Hi @sKopheK,

This was by design. When Ritwick Dey created the extension it was built upon the generic principle of if it's a partial it could be included. So lets keep it simple and compile every file (settings dependant).

There was an issue raised over in his repo that covered it. From what I remember it was decided that there wouldn't be a simple way of doing it without effecting the performance of the extension itself. However, for the life of me, I can't find the issue!

Closing as wontfix. However, if this becomes a real issue across multiple users then I will reconsider taking the time to do a full workaround on the extension. Looking into it

👍 if you want this adding

@sKopheK
Copy link
Author

sKopheK commented Jan 19, 2021

thanks for the answer. switching from NetBeans IDE, I'm used to compiling only what was really changed - however there was still sass@ruby used and thus it was really slow, especially when recompiling all files. pitty, i won't be getting much performance boost when updating any of my many partials :(

@sKopheK
Copy link
Author

sKopheK commented Jan 20, 2021

project with ~400 files suffers a lot by this restriction, please take a look on the video:
https://drive.google.com/file/d/1vO4G3DcLzu3UPCvMwDEgu6bypuGzTiQc/view?usp=sharing
also added you to a private repo with the files shown in the video so you can test yourself.

when other files such as JS, PHP or HTML is there in the project folder, it gets even more slow because it waits until github scanning is done, which when it kicks in it goes into some kind of pending mode and watch is delayed by a couple of tens of seconds, but this might be an issue of git integration in the VS Code: https://drive.google.com/file/d/10cS_sAn-16MYWuVEMiwd8pSD6qaJBCu6/view?usp=sharing

@glenn2223
Copy link
Owner

Yeah, I've seen and can feel your pain. I'll see if I can find anything to implement that'll help.

It'll be slow to research, check, implement and test as I'm a bit rammed at the moment with work, uni study, etc, etc. It's not stopping me from investing time into my opensource stuff, but it's definitely reduced it compared to Christmas (when everything else stopped 😄 )

@glenn2223
Copy link
Owner

glenn2223 commented Jan 29, 2021

Doing some testing, I think the main delay comes from git integration (as you suggest).
This is because the initial pull back of files is instant on my machine (when the Compiling Sass/Scss Files: output is shown).
However compiling does take a few seconds to complete for all the files (when the output of Watching... is shown).

I can see the issue this causes when compiling everything, even those files that don't actually use the partial.

Initial thoughts: compile a dictionary of file data (the file, the imports, the date it was last modified) and updating checking it as files save, are created and on launch.

v5 coming soon so this may be a v6 or v5.x (depending on the possibility of breaking changes, 🤞 for none)

Leaving closed until after v5 release Opening to prevent duplicate issues being raised

@sKopheK
Copy link
Author

sKopheK commented Mar 9, 2021

Hi, a little update on this one - was using NetBeans since its support for changed files solves the partials issue mentioned above, but as it runs sass compiler for every single changed file, it's also slow. Running the sass executable directly with --watch parameter is blazing fast tho, correcty identifies files to recompile when a partial is changed and the --stop-on-error parameter is something you might want to add support for in here as well.

https://sass-lang.com/documentation/cli/dart-sass

@enoversum

This comment has been minimized.

@glenn2223

This comment has been minimized.

@enoversum

This comment has been minimized.

@glenn2223

This comment has been minimized.

@enoversum

This comment has been minimized.

@virik
Copy link

virik commented Dec 30, 2023

I am experiencing some issues with this as well. I have read the above comments, and I understand why all files are generated. However I have multiple projects in my workspace, and saving a partial also generates files for my other projects. This might cause problems if other developers have working on the projects in the meantime. Would it be possible to have the extension only generate files for the related project (project root folder). Example: https://d.pr/i/qnAV4D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants