Conversation
|
I'm actually giving spacemacs another try at the moment. |
|
I use spacemacs too. |
|
@hdgarrood @LiamGoodacre well if you want to give it a try you can I'll document it 🔜, but for now if you swap the
If you now try to get completions in a module you should only be able to complete exported identifiers.
If rebuilding succeeds and you try to get completions you should now also get suggestions for private identifiers. P.S. rebased again |
6732395 to
3b3bc8b
Compare
|
Do we know why the build fails? |
|
Sorry, but I have no idea O.o |
|
Looks like Appveyor is having trouble with Node. |
|
@garyb Could you maybe run the tests for this branch on windows, that would be really nice? I don't see why this wouldn't work on windows. |
|
I can do sure, I think this is just an AppVeyor glitch though. @hdgarrood can you restart it? Also, is there any way you can give us permission to do stuff with setup/restarting on there too? |
|
I've restarted it. I have no idea how to give you access, though. :( |
|
Hmm, it timed out again, weird. Got a lot further that time though. @hdgarrood No problem about the AppVeyor thing, you'd think it would just work anyway, as it should be able to tell from our organisation membership the way Travis does. |
|
Maybe http://help.appveyor.com/discussions/questions/1459-mirroring-github-organization-permissions? Y'all are doing awesome code but I figured I could at least google in between configuring WebPack 😄 |
|
That probably deserved a "lmgtfy", I was just too lazy to check 😆. Thanks though! I need to do the same for SlamData soon. |
|
Thanks @AppShipIt, I think that should do the trick. Anyone in the owners team of the purescript org should be able to restart builds now, I think. |
|
Much obliged jealous of y'all's productivity today 👏 |
|
Sorry but I have no idea why this fails on appveyor. I can squash and have it rebuild again but it's just guessing from my side. |
|
I'll try it locally, see if there's any more info. |
|
Nope, no more useful info, but it does get up to: and then hangs indefinitely... well, for at least 5 minutes before I killed it anyway, and more like 60mins on AppVeyor by the looks of it, since it's timing out there. 😢 |
|
Argh... Thank you for the information! I'll see if I can add in a few timeouts and see where it hangs. |
|
The only other thing I can say is it doesn't appear to be using any CPU time and the memory usage is static when it gets stuck too. |
3b3bc8b to
feb569d
Compare
|
Setting up a Windows environment atm. I have no idea what is going on :D |
|
Doh 🙈 |
|
Sank enough time into this for today... this is really frustrating :D It looks like something is deadlocking, but I think that really shouldn't happen when I'm only using |
d9e01b4 to
ed5fa86
Compare
|
|
||
| hidden x _ = x | ||
|
|
||
| exported :: forall a. a -> a |
ed5fa86 to
34fd508
Compare
|
Squashed and rebased on the newest 0.9 branch |
|
Perhaps it is easier to just do externs generation twice then? Edit: that does thave the downside that we need to change the |
|
I kind of talked about this with @hdgarrood and @nwolverson and they didn't like the idea that this would now allow users to access private members of their modules. I was kind of asking for this in #1620. Writing the opened externs file to disc that is. |
|
I tend to agree, but we don't have to save the modified externs. |
a2adead to
18723c7
Compare
18723c7 to
8e61d9a
Compare
|
rebased again and adopted Rebuild.hs to utilize #2126 |
|
I don't think changing the Make API to accomodate for this very narrow usecase is a good idea. I still think it's a good idea to give tools the ability to turn off the cache, because tools that only report errors (pscid, webpack-loader) and don't offer any completions shouldn't have to wait twice as long. I image that Atom or Emacs would turn it on by default and allow the user to disable it with an option. Once we start working on emulating ghci's EDIT: The CI failure is some git problem on OSX |
|
What if the secondary build were sparked on another thread in the background? That way, we can cache the result, but not hold up the UI. You'd have to be careful to avoid race conditions when updating the state of course. |
|
I don't feel confident handling concurrency yet. Spinning up worker threads makes testing a lot harder and I don't want to take that complexity until we have a really good reason. Thinking about this a bit more, I am fine with just removing the flag and always rebuilding twice, since a lot of the "rebuild" time is actually spent sorting the externs and we don't have to do that twice. |
8e61d9a to
9bfa4ff
Compare
It's cached with its exports opened up, so that we can source completions from private members when we are editing a module. * Adds documentation to the functions inside ...Ide.State and breaks the functions into a pure and a stateful part to minimize time spent in STM * Cleans up json instances for Command to use Applicative style where possible
rebuildModule inside ...Make already does that now
Now that multiple modules per file are forbidden, we can simplify the parsing code in Rebuild a bit.
9bfa4ff to
4396720
Compare
|
Rebased and merged again :) |
|
Is this PR going in with 0.9? It's not a breaking change so if it's too much to review until then we could easily put it into 0.9.1 |
|
I think it should, but I won't be able to review it for a couple of days. Sent from my iPhone
|
| Left parseError -> | ||
| throwError . RebuildError . toJSONErrors False P.Error $ parseError | ||
| Right [m] -> pure m | ||
| Right _ -> throwError . GeneralError $ "Please define exactly one module." |
There was a problem hiding this comment.
I think this case can be an internalError now, since we only allow a single module per file.
There was a problem hiding this comment.
Seems like you're looking at an outdated diff. I did that in this PR
There was a problem hiding this comment.
Oh, weird. Thanks, looks good.
|
Looks good to me! |
|
Thanks @kritzcreek ! |
|
Cool thanks! |
* Cache the last rebuilt module inside psc-ide state It's cached with its exports opened up, so that we can source completions from private members when we are editing a module. * Adds documentation to the functions inside ...Ide.State and breaks the functions into a pure and a stateful part to minimize time spent in STM * Cleans up json instances for Command to use Applicative style where possible * Don't add a default import for Prim rebuildModule inside ...Make already does that now * only parse a single module when rebuilding Now that multiple modules per file are forbidden, we can simplify the parsing code in Rebuild a bit. * remove the cacheSuccess flag * fix docs
Rebased on top of the 0.9 branch.
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?