WurstScript icon indicating copy to clipboard operation
WurstScript copied to clipboard

Use dependencies from `_build/dependencies` folder

Open peq opened this issue 8 years ago • 4 comments

  • [x] Teach compiler to find dependencies in _build/dependencies automatically (folder created by setup tool)
  • [x] Make editor track changes to files in _build/dependencies (basically handle them like files in the wurst folder)
  • [ ] Before compiling clean packages not from wurst folder (i.e. packages from dependencies`)
  • [ ] Add a feature to import a package from a specific dependency (import Event from Frentity)
  • [ ] Change package resolution strategy: First search package in current project, then in dependencies. Do not search package in transitive dependencies. Probably this requires some changes in the Wurst Setup tool.

This has the following benefits:

  • updates in dependencies are directly reflected in the overall project (no more clean necessary)
  • Import autocomplete and quickfixes know about all sources and thus are more useful (no more lazy loading of dependencies)

peq avatar Oct 16 '17 21:10 peq

Becoming more important by the day 🍡

Frotty avatar Aug 02 '18 07:08 Frotty

I think the first two points already work as expected. So only the third point (cleaning unused packages from dependencies) needs to be implemented. Or am I missing something?

peq avatar Aug 10 '18 18:08 peq

No, the compiler doesn't find them "automatically". It's still done via the setup generating a Wurst.dependencies file, which points to the folders inside the dependencies folder. Iirc we wanted to get rid of that dependencies file. The track changes is also still broken I think. Changing Dependency packages requires clean or can cause ambiguity errors. I will recheck on this.

Frotty avatar Aug 11 '18 09:08 Frotty

I added some code to automatically add folders from _build/dependencies in 3a3e1b71907aaf80e937f4dac9c8aef1fca00efd

Can you check if that works as intended for you? I'll also try to do some unit tests for this.

peq avatar Aug 12 '18 15:08 peq