[Ann] BashSupport 0.9.1

A new update for BashSupport is available now.

Idea IntelliJ doesn't mark the plugin as updated in the plugin manager. I don't know why. Installation still works, though.

The changelog:

  • Variables and $-syntax elements like subshells inside of strings are parsed
  • Highlighting of Strings works again
  • Backtick command inspection has now default level "warn"
  • "Fix unusual shebang lines" doesn't suggest alternatives for valid commands any more
  • $0, $1 etc. are valid internal variables now
  • String like "$( ( echo a ) )" are now parsed


Regards,
Wallaby

0
14 comments

Thanks again, Wallaby.

In case it might trip people up, the main ("Installed") Plug-In Manager display doesn't show the available update for BashSupport 0.9.1 (at least not for me), but if you go to the Available display, you can right click on BashSupport (and confirm that it shows verson 0.9.1) and select Update Plugin and the update will occur as it should.


Randall Schulz

0

Hi, W.P,

I've gotten a couple of exception traces from Bash 0.9.1. It happens very reliably when I change the TODO settings and confirm the change.

Here's one example of the stack trace I get:

null
java.lang.AssertionError
    at com.ansorgit.plugins.bash.lang.lexer.StringParsingState$SubshellState.enterParenth(StringParsingState.java:37)
    at com.ansorgit.plugins.bash.lang.lexer.StringParsingState.enterSubshellParenth(StringParsingState.java:116)
    at com.ansorgit.plugins.bash.lang.lexer._BashLexer.advance(_BashLexer.java:1433)
    at com.intellij.lexer.FlexAdapter.locateToken(FlexAdapter.java:101)
    at com.intellij.lexer.FlexAdapter.getTokenType(FlexAdapter.java:66)
    at com.ansorgit.plugins.bash.lang.lexer.MergingLexer.locateToken(MergingLexer.java:91)
    at com.ansorgit.plugins.bash.lang.lexer.MergingLexer.getTokenType(MergingLexer.java:52)
    at com.ansorgit.plugins.bash.lang.lexer.BashLexer.getTokenType(BashLexer.java:15)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.a(LexerEditorHighlighter.java:43)
    at com.intellij.openapi.editor.ex.util.LexerEditorHighlighter.setText(LexerEditorHighlighter.java:157)
    at com.intellij.psi.impl.cache.impl.id.IdTableBuilding$TokenSetTodoIndexer.map(IdTableBuilding.java:11)
    at com.intellij.psi.impl.cache.impl.id.IdTableBuilding$TokenSetTodoIndexer.map(IdTableBuilding.java:24)
    at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:0)
    at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:3)
    at com.intellij.util.indexing.MapReduceIndex.mapNew(MapReduceIndex.java:82)
    at com.intellij.util.indexing.MapReduceIndex.update(MapReduceIndex.java:45)
    at com.intellij.util.indexing.FileBasedIndex.a(FileBasedIndex.java:130)
    at com.intellij.util.indexing.FileBasedIndex.indexFileContent(FileBasedIndex.java:390)
    at com.intellij.util.indexing.UnindexedFilesUpdater.processFile(UnindexedFilesUpdater.java:27)
    at com.intellij.ide.startup.FileSystemSynchronizer.updateFiles(FileSystemSynchronizer.java:191)
    at com.intellij.ide.startup.FileSystemSynchronizer.execute(FileSystemSynchronizer.java:72)
    at com.intellij.util.indexing.FileBasedIndex$10.run(FileBasedIndex.java:11)
    at com.intellij.util.indexing.FileBasedIndex$11$1.run(FileBasedIndex.java:4)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
    at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:3)
    at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)



Randall Schulz



Attachment(s):
BashSupport-stack
0

my bug still not fixed

index variable defined in arithmetic for is not recognized as variable
no ctrl+click, no crtl+shift+i over it

for (( c=1; c<=5; c++ ))
do
    echo $c
    echo "Welcome $c times..."
done

0

fr: support bash parameters in shebang line

example:

#!/bin/bash -x


i can add "/bin/bash -x" to the list of valid commands
but it is quite inconvenient to have big list of valid commands

0

I just received the following from the Bash plugin, with Maia build 10558.
Looks like an OpenAPI change?

Found class com.intellij.lexer.Lexer, but interface was expected: Found class
com.intellij.lexer.Lexer, but interface was expected
java.lang.IncompatibleClassChangeError: Found class com.intellij.lexer.Lexer,
but interface was expected
at com.ansorgit.plugins.bash.lang.lexer.MergingLexer.start(MergingLexer.java:38)
at com.ansorgit.plugins.bash.lang.lexer.BashLexer.start(BashLexer.java:15)
at com.intellij.lexer.Lexer.start(Lexer.java:45)
at com.intellij.lang.impl.PsiBuilderImpl.a(PsiBuilderImpl.java:292)
at com.intellij.lang.impl.PsiBuilderImpl.]]>(PsiBuilderImpl.java:281)
at com.intellij.lang.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:3)
at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:35)
at com.intellij.psi.impl.source.tree.LazyParseableElement.c(LazyParseableElement.java:33)
at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:71)
at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:222)
at com.intellij.psi.impl.source.tree.CompositeElement.findLeafElementAt(CompositeElement.java:269)
at com.intellij.psi.impl.search.LowLevelSearchUtil.a(LowLevelSearchUtil.java:10)
at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsContainingWordInElement(LowLevelSearchUtil.java:72)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$5$1.run(PsiSearchHelperImpl.java:8)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:257)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.process(PsiSearchHelperImpl.java:3)
at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.process(PsiSearchHelperImpl.java)
at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:6)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:20)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:66)
at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:2)
at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:3)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.JobImpl.scheduleAndWaitForResults(JobImpl.java:32)
at com.intellij.concurrency.JobUtil.invokeConcurrentlyForAll(JobUtil.java:12)
at com.intellij.concurrency.JobUtil.invokeConcurrentlyUnderMyProgress(JobUtil.java:4)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.a(PsiSearchHelperImpl.java:141)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processElementsWithWord(PsiSearchHelperImpl.java:59)
at com.intellij.psi.impl.search.MethodUsagesSearcher.execute(MethodUsagesSearcher.java:35)
at com.intellij.psi.impl.search.MethodUsagesSearcher.execute(MethodUsagesSearcher.java:2)
at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:35)
at com.intellij.util.AbstractExecutorsQuery.forEach(AbstractExecutorsQuery.java:66)
at com.intellij.util.AbstractExecutorsQuery.findFirst(AbstractExecutorsQuery.java:46)
at com.intellij.util.UniqueResultsQuery.findFirst(UniqueResultsQuery.java:46)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.a(PostHighlightingPass.java:133)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.b(PostHighlightingPass.java:117)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.a(PostHighlightingPass.java:247)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.a(PostHighlightingPass.java:23)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.access$000(PostHighlightingPass.java:273)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass$1.run(PostHighlightingPass.java:6)
at com.intellij.codeInsight.daemon.impl.RefCountHolder.retrieveUnusedReferencesInfo(RefCountHolder.java:8)
at com.intellij.codeInsight.daemon.impl.PostHighlightingPass.doCollectInformation(PostHighlightingPass.java:82)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:5)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:3)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:257)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:20)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:25)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


A new update for BashSupport is available now.

Idea IntelliJ doesn't mark the plugin as updated in the plugin
manager. I don't know why. Installation still works, though.

The changelog:

  • Variables and $-syntax elements like subshells inside of strings are

parsed

  • Highlighting of Strings works again

  • Backtick command inspection has now default level "warn"

  • "Fix unusual shebang lines" doesn't suggest alternatives for valid

commands any more

  • $0, $1 etc. are valid internal variables now

  • String like "$( ( echo a ) )" are now parsed

Regards,
Wallaby
---
Original message URL:
http://www.jetbrains.net/devnet/message/5240885#5240885



0

Hi,
sorry

This bug won't be fixed anytime soon. It required to implement full support for arithmetic expression parsing. I don't have time for this atm.

Regards,
Wallaby

0

Hi,
thanks for the suggestion. This sounds like a useful feature and it's already on my ToDo list. The next update will take some time, though.

Wallaby

0

Hi,
yes, it looks like the old Lexer class is now an interface.

I do not intent to release a plugin version for 9.0 eap version, though. I hope to release a version for 9.x when it's released, though.

Regards,
Wallaby

0

Hi,
thanks for the report.
I'll try to fix this for the next update. Is there any bash source file in particular which triggers this exception?

Kind regards,
Wallaby

0

Hello, w.p,

I'm still getting exceptions from BashSupport (0.9.6) under IDEA 9.0.1. They happen when I do a global find usages (on a symbol in Scala code, if that might somehow be relevant).

I've attached a text file holding the most recent stack trace presented by BashSupport.


Randall Schulz



Attachment(s):
BashSupport-stack-02.zip
0

Hi,
thanks for that report.

I'll try to fix this for the next update.

Wallaby

0

Hi,
I had a look at the stacktrace. It is a bug in the plugin but without further help it's hard to find and fix.

Is there any specific script where this problem appears?
If you can't pinpoint it then you have to wait for the next version which will provide a way to enable the parser's debug level. That way you should get a more detailed error message which will help me to fix the issue.

Thanks,
Wallaby

0

Hi,

Related to my other recent post, I think it's the fact that BashSupport is claiming non-BASH files.


Randall Schulz

0

Hi,
this bug / feature will be supported with the next update, 0.9.7-maia.

Best regards,
Wallaby

0

Please sign in to leave a comment.