halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

linter no longer register compiler errors since atom/linter 2.3.0 #153

Closed jwoLondon closed 5 years ago

jwoLondon commented 5 years ago

After upgrading atom's linter from 2.2.0 -> 2.3.0, elmjutsu no longer reports linter errors. I note that in the release notes for linter 2.3.0 it says ""Remove support for legacy linter APIs"", so I wonder if something in elmjutsu or upstream (e.g. language-elm) is relying on the deprecated, now removed, API?

Downgrading linter to 2.2.0 in atom provides a temporary fix, but this won't be obvious for new users.

n1k0 commented 5 years ago

Experiencing the same issue, +1.

Edit, for those wondering; to downgrade to 2.2.0, run apm install linter@2.2.0 and restart Atom.

ScribblerWriter commented 5 years ago

Yep, just ran into this. Downgraded to make it work. And as a new user, definitely not obvious, so I appreciate the fix listed in the issue here. Thanks. :)

halohalospecial commented 5 years ago

Hi all, sorry for the late response. The dilemma is that Elmjutsu is using the html property to color the different parts of the messages (https://github.com/steelbrain/linter/blob/v1/docs/types/linter-message-v1.md) and to provide added features (e.g. clicking on a symbol in the message will jump to the declaration). With Linter v2, only a markdown property is available, which is limited in our use cases. I personally use atom-ide-ui instead of linter and linter-ui-default.

ScribblerWriter commented 5 years ago

Thanks. I’ve switched to atom-ide-ui. Seems to work. Unless you’re planning on updating for support for the newer linter versions, perhaps removing the support would be better. Unless you happen to know to downgrade, it’ll just make it look like it’s not working.

ymtszw commented 5 years ago

Let me chime in on this. What I fear is, since atom-ide-ui is no longer actively supported by its original creator (= Facebook), the community may shift to mainly use (and provide their time and efforts on) Linter and other modularized, separate packages rather than monolithic atom-ide-ui. If that is indeed becoming the trend, we might better lean on Linter. cf. Primary discussion thread on the topic: https://discuss.atom.io/t/impact-of-nuclide-extension-being-removed/61242

Who knows, but that is my thought. Probably keeping Linter-compatible APIs may save your time in the future...

ScribblerWriter commented 5 years ago

Didn’t know atom-ide-ui was discontinued. Then finding a way to work with something that’s being updated makes more sense, I should think.

Arcanemagus commented 5 years ago

In the v2.3.0 release of linter support for the v1 API was removed, breaking semver. This means that this provider is no longer supported by the current version of linter.

To get this provider working again it will need to be upgrade to the v2 API, a guide for accomplishing that can be found here: Upgrading to Standard Linter v2.

Until this is fixed in order to use this provider with linter you will need to downgrade to the last version of linter that supports the v1 API, you can do this with apm install linter@2.2.0.

jwoLondon commented 5 years ago

Can I also add that while the atom-ide-ui workaround sort of works, it leads to conflicts if linter is also running. I use other plug-ins that need linter so this isn't really a very stable workaround, at least for me.

Arcanemagus commented 5 years ago

atom-ide-ui does work, but is no longer maintained (as mentioned earlier in this thread).

ymtszw commented 5 years ago

I looked into API upgrade, and it seemingly works, so here's PR: https://github.com/halohalospecial/atom-elmjutsu/pull/158 I tested with Linter 2.3.0, linter-ui-default 1.7.1.

As @halohalospecial mentioned, html is now replaced by description with markdown support. It actually handles HTML too, since HTML subset is valid in markdown, so current markups in elmjutsu appear to be useable in new APIs.

Although I haven't checked every kind of messages produced, so definitely require review by folks. And of course, I may overlooked some features affected by this API changes, so it would be greatly appreciated if @halohalospecial can look into this.

halohalospecial commented 5 years ago

Hi all, sorry for the delay! Can you check out v9.11.0? Elmjutsu will now automatically detect the Linter API version (v1 or v2) based on the version of the linter package. It will select v1 if using atom-ide-ui.

Thanks for the PR @ymtszw! :tada:

jwoLondon commented 5 years ago

Since v9.11.0, I am no longer getting specific error messages. Instead I just get generic NAMING ERROR, MISSING PATTERNS etc.

I also continue to get a conflict message when I start Atom

Choose a linter UI

You have both linter and atom-ide-diagnostics enabled, which will both display lint results for Linter-based packages.

To avoid duplicate results, please disable one of the packages.

Disable Linter Disable Diagnostics

As noted above, I need to have Linter installed for some other plug-ins.

ymtszw commented 5 years ago

Since v9.11.0, I am no longer getting specific error messages. Instead I just get generic NAMING ERROR, MISSING PATTERNS etc.

See the new README:

  • For Error Highlighting:
    • Install atom-ide-ui or linter + linter-ui-default.
    • With linter v2 API (linter 2.3.0 and above), tooltips are collapsed by default. You have to click expand buttons (">"), or bind linter-ui-default:expand-tooltip to some key and hold it to expand them.

This is a deliberate change in linter-ui-default, preventing large tooltips from blocking our sight into editor buffers. I believe atom-ide-ui behaves this way too.

As for the reported conflict between linter and atom-ide-ui active at the same time (the popup itself is generated by atom-ide-ui I beleve), atom-ide-ui consumes any providers that properly implements linter APIs (both v1 and v2), so you SHOULD be able to choose one of them and disable the other. If some packages "block" the migration (i.e. providers that only work with either one of them), you should report the issue exactly like here in elmjutsu.