Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Conversation

@takbal
Copy link
Contributor

@takbal takbal commented Mar 3, 2021

This is a fork that replaces Lint.jl with StaticLint.jl. It seems to work for me, but could use more testing.

Please check the readme for changes and caveats.

Technical details:

From 956971b it is an almost complete rewrite to use a single server process. Julia is quite a heavy thing to run one for each editor, and I have decided that it is more important to keep resources low than being just a bit faster. Perhaps it could be still parallelised further by running a dedicated pipe for each editor, rather sharing a single pipe like now, but I feel the speed is already adequate, especially considering that the bottleneck is the symbol server building anyway (that is already spawning in a separate thread).

I still see some problem with lints at end of line being dragged around if enter is pressed on it, but this looks like happening with eslint too, so probably it is an issue with linter.

I know almost nothing of Atom development or js, so the changes are likely ugly there, please revise. I could not make Atom to shut down the child process, so the server exits by polling Atom's PID right now.

Fixes #12

takbal added 6 commits March 4, 2021 16:15
 - only 1 julia process (not one per editor)
 - linting dynamically
 - feedback on start of environment parsing
 - faster startup
 - TODO: shutdown on windows
fixed for unsaved new files (but linting does not show despite messages sent)
added message for executable change (terminateServer does not seem to work in .js)
bugfixes for empty files and root parsing
do not assume that spawnServer works; ask the user to restart if executable is changed
@aminya
Copy link
Member

aminya commented Mar 8, 2021

Could you fix the CI as well? If you can fix the CI somehow, I will merge it.

Unfortunately, this organization is a closed access organization, and even though I have write-access to this specific repository, I cannot merge this pull request.
https://github.com/AtomLinter/linter-eslint/issues/1383

@takbal
Copy link
Contributor Author

takbal commented Mar 8, 2021

I have an improved version now that does on-the-fly linting, and uses only a single server. Still has to somehow kill the process on the Windows side on shutdown. Will try to fix the CI.

@takbal
Copy link
Contributor Author

takbal commented Mar 9, 2021

@aminya all done now: single server, linting as typing, works on Windows, even that crude unit test passes. Please merge if you can.

Copy link
Member

@aminya aminya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this awesome work!

@aminya aminya merged commit 47151f7 into AtomLinter:master Mar 9, 2021
@aminya aminya mentioned this pull request Mar 9, 2021
@aminya
Copy link
Member

aminya commented Mar 9, 2021

@takbal I have been developing linter/linter-ui-default for quite some time now, and yesterday I got admin access to this organization. We can fix the caveats mentioned in the readme. Just let me know if you are interested to help!

@takbal
Copy link
Contributor Author

takbal commented Mar 9, 2021

@aminya Thanks!

Perhaps making a new release would be nice, so it shows up in the official repos. The README should be changed accordingly, like removing the ref to my fork.

About help: absolutely, this effort could clearly benefit from a js/Atom expert like yourself - I have just butchered the. js scripts without any real knowledge of how it should be done. Please modify as you wish - I have no big plans on working on it further, unless it breaks.

@takbal
Copy link
Contributor Author

takbal commented Mar 9, 2021

Oh you did it already while I was typing, awesome.

@aminya
Copy link
Member

aminya commented Mar 9, 2021

@takbal Thank you!

I will dive into the code once I find some free time in the future. I am planning on making a full-fledged ide-julia based on LSP to consolidate all the code into one all-around package. But for now, the good thing is that the linter works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementing StaticLint.jl

2 participants