AtomLinter / linter-julia

This linter plugin provides an interface to Lint.jl.
https://atom.io/packages/linter-julia
MIT License
17 stars 3 forks source link

Linter Hangs Indefinitely - no errors #66

Closed btmit closed 5 years ago

btmit commented 5 years ago
julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
OS: macOS (x86_64-apple-darwin14.5.0)
(v1.1) pkg> status
    Status `~/.julia/environments/v1.1/Project.toml`
  [c52e3926] Atom v0.8.5
  [6e4b80f9] BenchmarkTools v0.4.2
  [8f4d0f93] Conda v1.2.0
  [7a1cc6ca] FFTW v0.2.4
  [7073ff75] IJulia v1.17.0
  [a98d9a8b] Interpolations v0.11.2
  [682c06a0] JSON v0.20.0
  [e5e0dc1b] Juno v0.7.0
  [d4b2101a] Lint v0.5.2+ #master (https://github.com/tonyhffong/Lint.jl)
  [2fda8390] LsqFit v0.8.1
  [58dd65bb] Plotly v0.2.0
  [91a5bcdd] Plots v0.23.0
  [438e738f] PyCall v1.18.5
  [d330b81b] PyPlot v2.7.0
  [b8865327] UnicodePlots v1.1.0
  [c2297ded] ZMQ v1.0.0
$ atom --version
Atom    : 1.36.0
Electron: 2.0.18
Chrome  : 61.0.3163.100
Node    : 8.9.3
Community Packages (11) /Users/br22856/.atom/packages
├── busy-signal@2.0.1
├── indent-detective@0.3.2
├── intentions@1.1.5
├── language-julia@0.18.0
├── latex-completions@0.3.6
├── linter@2.3.0
├── linter-clang@4.1.2
├── linter-jsonlint@1.4.0
├── linter-julia@0.7.4
├── linter-ui-default@1.7.1
└── tool-bar@1.1.11

Julia linter runs but never returns or outputs an error message (that I can find in console or elsewhere). Running the linter directly from Julia works fine as does other linters in Atom. Only indication I can find is the yellow pulsing dot at the bottom of the window which will read Current: Julia on test.jl forever.

test.jl:

function
    begin
end

and predictably

julia> lintfile("test.jl")
test.jl:0 E111 : Base.Meta.ParseError("invalid name \"begin\"")

I tried with both the default Julia path in addition to an absolute path in the linter-julia settings. Any suggestions on how to debug?

cedeerwe commented 5 years ago

@btmit I have exactly the same issue, have you managed to solve it somehow?

Arcanemagus commented 5 years ago

Julia Version 1.1.0

This package, and the published version of Lint.jl, currently aren't written for support of Julia past 0.5 or so. I managed to put together https://github.com/AtomLinter/linter-julia/pull/68 to use Lint.jl directly from their master branch (which supports Julia 1+) and put together a server file here... but I don't use Julia myself so I have no idea if it works correctly or not.

Note that if you do want to try that PR you will need to update to a fixed version of Lint.jl.

cedeerwe commented 5 years ago

Thanks for the reply, now it all makes much more sense.

I was contemplating switching to Atom from VSCode due to the Linter having some issues, but it seems Atom has it's own issues as well. Perhaps I will give your suggestion a shot over the weekend.

Arcanemagus commented 5 years ago

I was contemplating switching to Atom from VSCode due to the Linter having some issues, but it seems Atom has it's own issues as well.

None of this has anything to do with Atom (or VSC), this is entirely an issue with Julia's terrible versioning and package management.

logankilpatrick commented 5 years ago

@cedeerwe same here.

logankilpatrick commented 5 years ago

I just get a pulsing yellow dot or I get an error when I just do lintpkg() or lintfile().

logankilpatrick commented 5 years ago

Guess it's time to write my own linter :)

gnangnan15 commented 5 years ago

It seems that the julia server that is spawned from server.js (using a BufferedProcess) does not stay alive at the end of the julia-server.jl script. That is why there is no answer from the server and the yellow dot keeps pulsing.

I have just tested to add an infinite while loop at the end of julia-server.jl and now the "dot is green".

Do you knom if the BufferedProcess should keep the process running?

aminya commented 5 years ago

The issue is fixed now. Closed by https://github.com/AtomLinter/linter-julia/commit/a2619ea158960b0146a20c2a43590944742faec3