Skip to content

Explain --editor-mode intent#3350

Merged
kritzcreek merged 2 commits into
purescript:masterfrom
chexxor:patch-2
May 7, 2018
Merged

Explain --editor-mode intent#3350
kritzcreek merged 2 commits into
purescript:masterfrom
chexxor:patch-2

Conversation

@chexxor

@chexxor chexxor commented May 4, 2018

Copy link
Copy Markdown
Contributor

I was confused the intent of the --editor-mode flag in purs ide server. I found #3006, which explained the intent. I hope this little change helps future people.

@nwolverson

Copy link
Copy Markdown
Contributor

Unfortunately I don't think that's actually correct, in particular "Rather than watch source files" - the alternatives do not watch source files, they watch externs files. With --editor-mode, either the changes to externs files all come from rebuild commands, or there must be an explicit load of dependencies (almost "report changed source files" but s/source/externs/)

Anyway that's all a bit pedantic, I think you could change it to "Rather than watch externs files, expect an editor to report changed source files" without terribly much loss of information (@kritzcreek ?)

@kritzcreek

Copy link
Copy Markdown
Member

What @nwolverson said. I think we could add a bit of motivation here, saying that file watching has been flaky empirically and polling is resource intensive.

I was wondering if I should switch editor-mode on by default for 0.12? It definitely creates situations which are harder to debug for newcomers, since there's no way they understand that them running pulp build on the console just invalidated their IDE state.

@chexxor

chexxor commented May 4, 2018

Copy link
Copy Markdown
Contributor Author

@kritzcreek I didn't want to add too much text to that flag's explanation, as further explanation seems to belong in DESIGN document in this directory. I didn't make a change to that document because it's rather big/unorganized and I couldn't think of a good place in there to put it -- there's no config or options or flags section. Should we find a place for those sections? Or is the README the intended place for explaining the intents and implementation of the config/flags?

@chexxor

chexxor commented May 4, 2018

Copy link
Copy Markdown
Contributor Author

Also, I totally forgot that purs ide watches externs instead of source files. I just can't get that into my brain despite repeatedly making that mistake. Thanks for noticing that and fixing it!

@kritzcreek

Copy link
Copy Markdown
Member

Thanks!

@kritzcreek kritzcreek merged commit e2cba66 into purescript:master May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants