Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated packages are not highlighted anymore #109

Closed
1 task done
nutzaalex opened this issue Jun 7, 2024 · 22 comments
Closed
1 task done

Outdated packages are not highlighted anymore #109

nutzaalex opened this issue Jun 7, 2024 · 22 comments
Labels
bug Something isn't working

Comments

@nutzaalex
Copy link

What is the issue?

In the past, i used to see a warning underline under outdated packages in package.json in webstorm. This is no longer the case, I now see only vulnerabilities.

What are the steps to reproduce this issue?

It seems to simply happen in webstorm, I reverted to factory settings thinking I may have some other settings that are interfering, but I cannot get it to highlight outdated packages anymore. need to hover the mouse over each one to check if there is an update.

What were you expecting to happen?

As before, a warning underline highlighting the outdated packages.

Paste any relevant logs, error output, etc.

No response

What OS are you experiencing the problem on?

macOS

Additional platform information

WebStorm 2024.1.3
Build #WS-241.17011.90, built on May 23, 2024

Macbook pro M2 pro chip macos sonoma 14.5

Duplicates

  • I have checked that my problem has not already been mentioned recently in an existing issue
@nutzaalex nutzaalex added the bug Something isn't working label Jun 7, 2024
@WarningImHack3r
Copy link
Owner

Hey there!
Do you still can upgrade dependencies by hovering on them and/or batch updating through the plugin’s menu? Do you see the progress and scan report in the status bar? And if so, when clicking the status bar item do you see a list of outdated dependencies?

@nutzaalex
Copy link
Author

I can upgrade dep by hovering on them and using update all from the menu. I don't see the progress and scan report in the status bar though.

Screenshot 2024-06-07 at 09 57 53

@nutzaalex
Copy link
Author

nutzaalex commented Jun 7, 2024

here are the available options from the dropdown in case this helps:
Screenshot 2024-06-07 at 10 03 05

I invalidated cache both from this menu and a couple of times while reverting webstorm to factory settings, but it didnt fix it.

@WarningImHack3r
Copy link
Owner

It looks like a hovering color issue in the IDE.
I’m using the default warning and error colors the IDE provides. Can you check in the settings that both are enabled and configured?
You can easily know if it’s not by introducing a warning-level problem in your code and see if this is properly highlighted too.
If code warnings are not highlighted in the code too, it’s an IDE configuration issue.

Also, do you see the warnings/errors icons on the top right corner of the opened package.json file?

As for the status bar, is it enabled in the plugin settings? Didn’t you hide it from the WebStorm UI? (You can right click any status bar item and check if my plugin name is ticked or not)

@nutzaalex
Copy link
Author

hmmm, so I do see warnings if a package has a security vulnerability:
Screenshot 2024-06-07 at 10 21 12
Screenshot 2024-06-07 at 10 21 24

@WarningImHack3r
Copy link
Owner

That’s from the IDE, however it’s doesn’t seem to be the same kind of warning than the one I use (I use a regular warning, this one seems to be a security warning, which doesn’t have the same color afaik)
Can you try a warning in your code for example?

@nutzaalex
Copy link
Author

nutzaalex commented Jun 7, 2024

Hmm, I have looked in all editor inspections and color scheme, I think I do have warning colors set, and I do see them, even weak ones 🤔:
Screenshot 2024-06-07 at 10 40 48
Screenshot 2024-06-07 at 10 42 41

I'll check some more, do you have the exact warning name? I can perhaps search for that in the settings

@WarningImHack3r
Copy link
Owner

For deprecations, I’m using an highlight severity of Error with an highlight type of Like_Deprecated

For updates, I’m using an highlight severity and an highlight type of both Warning

@WarningImHack3r
Copy link
Owner

Also, did your overall issue happened after an upgrade of WS/my plugin or randomly after a WS restart?

@nutzaalex
Copy link
Author

It has been happening for a few days, I just started doing some updates recently and immediately noticed that feature was missing. Then I reset settings, reinstalled the plugin, reset cache etc. to try and make it work again.

@nutzaalex
Copy link
Author

I think you may be right, warnings are not shown in all cases even though I have them enabled. I will write to jetbrains about this.

@nutzaalex nutzaalex reopened this Jun 7, 2024
@nutzaalex
Copy link
Author

Discussed with intelij support, the errors and warnings seem to be working fine, as before, the plugin does not highlight oudated packages in package.json.

Here's proof of my inspections working, err, warning, weak warning, all of them in different colors:
Screenshot 2024-06-07 at 13 01 59

@WarningImHack3r
Copy link
Owner

I'll try once I'm home to reproduce your issue and indicate precisely which setting does affect the highlighting color for updates, even though it seems to be working fine in your setup.

I don't manage that from the plugin, the color highlighting is made by the IDE from the parameters I tell it to use so I doubt I can do anything about your issue, though I'll try my best to give you the best diagnostic I can.

@nutzaalex
Copy link
Author

nutzaalex commented Jun 7, 2024

No worries take your time.

On another note, the plugin it just crashed, heres the trace:

ExternalToolPass: 

com.intellij.diagnostic.PluginException: annotator: com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator@6ca7d3b7 (class com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator) [Plugin: com.github.warningimhack3r.npmupdatedependencies]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.processError(ExternalToolPass.java:253)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:213)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:200)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$0(ExternalToolPass.java:163)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.runChangeAware(ExternalToolPass.java:268)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$2(ExternalToolPass.java:163)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$15(BackgroundTaskUtil.java:371)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:366)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:161)
	at com.intellij.util.ui.update.ContextAwareUpdate.run$lambda$1$lambda$0(ContextAwareUpdate.kt:49)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.util.ui.update.ContextAwareUpdate.run(ContextAwareUpdate.kt:48)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:354)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:344)
	at com.intellij.util.ui.update.MergingUpdateQueue.doFlush(MergingUpdateQueue.java:301)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:283)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:250)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.util.Alarm$Request.lambda$runSafely$0(Alarm.java:369)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:253)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:369)
	at com.intellij.util.Alarm$Request.run(Alarm.java:356)
	at com.intellij.util.concurrency.Propagation.contextAwareCallable$lambda$2(propagation.kt:357)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:272)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:244)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:30)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:222)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
	at org.semver4j.internal.Comparator.checkAlphanumericPrerelease(Comparator.java:109)
	at org.semver4j.internal.Comparator.compareIdentifiers(Comparator.java:89)
	at org.semver4j.internal.Comparator.preReleaseCompare(Comparator.java:73)
	at org.semver4j.internal.Comparator.compareTo(Comparator.java:26)
	at org.semver4j.Semver.compareTo(Semver.java:355)
	at org.semver4j.Semver.compareTo(Semver.java:21)
	at kotlin.comparisons.ReverseOrderComparator.compare(Comparisons.kt:324)
	at kotlin.comparisons.ReverseOrderComparator.compare(Comparisons.kt:323)
	at java.base/java.util.TimSort.binarySort(TimSort.java:296)
	at java.base/java.util.TimSort.sort(TimSort.java:239)
	at java.base/java.util.Arrays.sort(Arrays.java:1233)
	at kotlin.collections.ArraysKt___ArraysJvmKt.sortWith(_ArraysJvm.kt:2179)
	at kotlin.collections.CollectionsKt___CollectionsKt.sortedWith(_Collections.kt:1075)
	at kotlin.collections.CollectionsKt___CollectionsKt.sortedDescending(_Collections.kt:1063)
	at com.github.warningimhack3r.npmupdatedependencies.backend.engine.PackageUpdateChecker.areUpdatesAvailable(PackageUpdateChecker.kt:111)
	at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invokeSuspend(UpdatesAnnotator.kt:80)
	at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(UpdatesAnnotator.kt)
	at com.github.warningimhack3r.npmupdatedependencies.ui.annotation.UpdatesAnnotator$doAnnotate$2.invoke(UpdatesAnnotator.kt)
	at com.github.warningimhack3r.npmupdatedependencies.backend.extensions.ExtensionsKt$parallelMap$1$1$1$1.invokeSuspend(Extensions.kt:29)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

@WarningImHack3r
Copy link
Owner

Looks like a bug in the Semver lib I use: can you send me your package.json so I can run it, identify which dep + version is causing that so I can fill an issue on their hand?

@nutzaalex
Copy link
Author

hmm, unfortunately I can't share it all it as its a private repo, but I disabled sections of it. Surprisingly, a popular one is the issue, commenting this it makes the plugin work again:

"styled-components": "5.3.8",

@WarningImHack3r
Copy link
Owner

Alright I'm gonna try to reproduce that with this line and send the report, thanks!

@nutzaalex
Copy link
Author

thanks for taking the time to find the issue! have an easy weekend!

@WarningImHack3r
Copy link
Owner

Your highlighting issue is not solved! ^^

The parsing crash is just another thing

@nutzaalex
Copy link
Author

nutzaalex commented Jun 7, 2024

oh, but it is :D that library is the issue the highlighting is not being applied:
Screenshot 2024-06-07 at 17 48 37

its just that it doesn't crash often at all, only sometime, but as you can see, it works without that lib + ver

@WarningImHack3r
Copy link
Owner

WarningImHack3r commented Jun 7, 2024

Oh!!! But how on earth were some deps highlighted hoverable despite that issue... It should've hang/crash before the end of the scan

Anyway, glad we found the cause: reporting that when I get home :)

@WarningImHack3r
Copy link
Owner

WarningImHack3r commented Jun 7, 2024

@nutzaalex FYI: semver4j/semver4j#264 (NPM packages must really stop creating such Semver monstrosities)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants