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

Error when including a colon in a string(works fine on command line) #1078

Open
johndunlap opened this issue Feb 18, 2021 · 4 comments
Open
Labels
Change Request Feature changes that are neither bugs nor enhancements. Priority 3

Comments

@johndunlap
Copy link

johndunlap commented Feb 18, 2021

image
Error text:
Error: (src/Main.hx:3: Name changed) Hamilton Osborn

Main.hx:
class Main { static public function main() { trace("Name changed : Hamilton Osborn"); } }
build.hxml:
-cp src -D analyzer-optimize -main Main --interp
Haxe version: 4.0.5
IntelliJ About:
IntelliJ IDEA 2019.3.3 (Ultimate Edition) Build #IU-193.6494.35, built on February 10, 2020 Licensed to NAME You have a perpetual fallback license for this version Subscription is active until March 27, 2021 Runtime version: 11.0.5+10-b520.38 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 5.8.0-7630-generic GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: Non-Bundled Plugins: artsiomch.cmake, com.andrey4623.rainbowcsv, com.chesterccw.excelreader, com.intellij.plugins.haxe, com.perl5, net.seesharpsoft.intellij.plugins.csv, org.elixir_lang

@EricBishton
Copy link
Member

Ok, this is hilarious. Whether it is a bug or not is an interesting question. The program executed just fine, but the plug-in found a line of text formatted like the compiler formats error output. The plug-in checks compiler and run-time output against a regular expression. This output happened to match and was flagged as an error.

We could tighten up the regular expression now that the compiler is generally better at formatting error output than it used to be. It will leave us missing older errors but that will fade as the user base abandons older compilers. Or, we could detect the compiler version and use different regular expressions per compiler version. There isn’t really a good mechanism to do that implemented at this time.

@johndunlap
Copy link
Author

Would it be possible to only parse for error output if the exit status of the program is non-zero?

@EricBishton
Copy link
Member

I'm not sure. It's kinda hard, since the processor is reading and displaying the input stream from the process long before the exit state is known. So that would mean not showing any output until the process is complete, or trying to display, and then later post-process for errors. Either way, it's not how IntelliJ is designed to handle process output.

We will leave this open so we remember to do the research.

@EricBishton EricBishton added Change Request Feature changes that are neither bugs nor enhancements. Priority 3 labels Feb 19, 2021
@johndunlap
Copy link
Author

It's a shame trace() outputs to STDERR, though I understand why it does. Differentiating between STDOUT and STDERR would be the Unixy way to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change Request Feature changes that are neither bugs nor enhancements. Priority 3
Projects
None yet
Development

No branches or pull requests

2 participants