[psc-ide] Cache last rebuild#2058
Conversation
|
Works fine for my few minimal testcases. Too bad hackage is down right now... If we were using stack for the builds we'd be fine.... just saying :D |
7250685 to
1d71c68
Compare
|
Not really sure why the CI failed but it might be related to the hackage outage we had a few days ago. The one thing I'd really like to figure out for this PR is when to invalidate the rebuild cache. I'd like to minimize the amount of false positives we give. |
|
retriggering the build |
Make as-patterns bind less tightly
* The current usage of psc-ide involves loading all modules anyway, so we don't worry about loading previously unloaded modules. * Don't attempt to reload deleted files
…provements Always reload Externs
|
I'd like to get some input on this. I'm not sure about the API. Basically after every successful rebuild, we have the chance to recompile the module with open exports and store it inside the server, so it can be used for autocompletion and type lookup. This will also add an optional module field to the completion and type commands. But we could also write the externs file, js file, and foreign file that we get this way to some point on the filesystem, and enable people to write unit tests for functions that are not exported by requiring these files. While writing this I realised that this is not specific to psc-ide either and we could do the same with a normal compiler run. We can however only do it for one module at a time, because opening up/removing export lists will remove reexports and might cause nameclashes in modules that depend on the opened module, but looking at the speed of rebuilds this should be a tolerable overhead. |
|
Okay after talking about this with @hdgarrood and @nwolverson I agree that writing anything to disc that potentially allows accessing private module members is way out of scope of this PR so I'd say this is a topic for another day. I think this is ready for review. If you can think of a way to make reviewing changes like this easier let me know. I can offer to implement the functionality in my psc-ide-emacs fork but I don't think anyone but me is using emacs? |
* Update for names in new prelude * Disable psci tests that rely on re-exports * Use bower rather than git submodule for support dependencies
* Expose missing type declaration suggestion * Tighten span for type wildcard warnings
Fix indentation bug purescript#1881
Also add comment explaining what the list actually does
Update the support modules list in the tests
adds module field to complete command
* Adds documentation for all the functions * Breaks out pure parts for all the stateful functions, to minify the time spent in STM and improve testability
Implements something like the Builder Pattern
this indicates whether to store a successful rebuild. False by default
a5b69fc to
6732395
Compare
|
see #2083 |
This is supposed to allow us to access private values of a module for completions inside that module.
If we recently rebuilt the module in question we can cache a version that opens up the exports for the module.
This is still very much a work in progress but I just put it into a PR to gather early feedback or ideas. This would also be a way to attack the issue outlined in #1620