DCD
DCD copied to clipboard
support "environments"
instead of the need to run n different instances of dcd on n different ports it would be nice if clients could choose an "environment" that has separate source files.
Something like this?
$ dcd-client --list-environments
☐ nightly-dmd
☑ latest-dmd
☐ latest-ldc
☑ gtkd
☑ libdparse
$ dcd-client --disable latest-dmd --enable nightly-dmd
That looks like it could be pretty useful. In my case - I wanted to add the compiler sources for the current compiler configured in intellij plus the current source directory for the project. So that a user doesn't have to manually configure the imports list for DCD.
How would an "environment" be specified?
Currently I set the imports on the dcd-server and not on the dcd-client. It looks like environments config would apply at the dcd-client level - so you start one dcd-server which knows about environments - and then multiple dcd-clients specify the particular environment they want?
I like --enable option - not sure about --disable because that suggests all environments are active and you disable the ones you don't want - whereas --enable means to me that all environments are not active and you specifically --enable the ones you want.
Overall I think this would make configuration a lot easier when you are running multiple versions of dcd.
the main use case i saw was dependencies with different versions. say you work on two projects, website A and B. a depends on vibe.d ~master and B depends on a specific version.
one could go as far as directly recognizing an "environment" by sending a path to a dub.json and it automatically gets all paths and the name. i think https://github.com/Pure-D/workspace-d does something similar.
(not sure if currently possible, but if not: there should also be a way to reload all files from a folder in case where the dependency/environment is a git (sub-)repo and you switch the branch. however if you have lots of dependencies you do not want to refresh everything.
(not sure if currently possible, but if not: there should also be a way to reload all files from a folder in case where the dependency/environment is a git (sub-)repo and you switch the branch. however if you have lots of dependencies you do not want to refresh everything.
DCD already checks the modification times on files when a symbol from them is used for completion. I'm not sure what git does with modification times though.
A different idea would be that the client sends a unique key and the server keeps the data separate based on that key.
A different idea would be that the client sends a unique key and the server keeps the data separate based on that key.
There is no need for a unique key - dcd-server should just do the right thing and use only the import paths it is given together with the request. See #316 for some thoughts on this.
There is no need for a unique key - dcd-server should just do the right thing and use only the import paths it is given together with the request. See #316 for some thoughts on this.
How would you deal with different projects using different version of druntime and Phobos at the same time?
The request would specify the Druntime and Phobos include path.
The request would specify the Druntime and Phobos include path.
So every request would need to specify all the needed import paths, every time?
Yes. There is no downside to it.