Giter Site home page Giter Site logo

Comments (9)

mihnita avatar mihnita commented on June 12, 2024

Thank you for reporting this.

Unfortunately I can't reproduce it.
I've tried it on Windows (with "Visual Studio" toolchain), macos (with "MacOSX GCC" and "Makefile project"), and Linux (gcc and Makefile project)
Can you provide some more info?


Do you have more than one C/C++ project opened?
There might be a chance it is issue #50?


Something you can try
WARNING: will need cleanup afterwards, meaning uninstall the plugin, remove the test site, and reinstall from Marketplace

"Help" (main menu) --> "Install New Software..." --> Manage (button, top-right)
Sort by Location, find https://www.mihai-nita.net/eclipse, and change it to https://www.mihai-nita.net/eclipse_test
(or make a copy, your call)
"Apply and Close" (button)

In the "Work with:" drop-down-list (combo-box) select "Mihai's Eclipse plugins - https://www.mihai-nita.net/eclipse_test"

You should see an update (1.4.7.202205170912)
Install it, and see if it solves the problem.


To cleanup:

  • Uninstall the plugin ("Help" --> "About Eclipse" --> "Installation Details" (button) --> select "Ansi Console" and click "Uninstall..." (button)
  • Restore the original URL (eclipse_test => eclipse)

WARNING: that test folder will go away at some point (after the next release), so don't keep it around.
And what's there should be considered beta / pre-release / unstable / not-properly-tested :-)

Mihai

from ansi-econsole.

ydaveluy avatar ydaveluy commented on June 12, 2024

Hello,

To reproduce with Eclipse 2022-03 (C++) on Linux with ansi-econsole 1.4.6, create an Hello World C++ Makefile Project (Project->New->C/C+->C++ Project->Makefile Project->Hello World C++ Makefile Project) from a new workspace.

In the Makefile add -fdiagnostics-color flag:
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 -fdiagnostics-color

In the cpp file add an invalid statement, for example: invalid_type i;

Build the project:

`
11:06:37 **** Incremental Build of configuration Default for project Test ****
make all
g++ -O2 -g -Wall -fmessage-length=0 -fdiagnostics-color -c -o Test.o Test.cpp
[01m[KTest.cpp:13:1:[m[K [01;31m[Kerror: [m[K‘[01m[Kinvalid_type[m[K’ does not name a type
invalid_type i;
[01;32m[K ^[m[K
make: *** [Test.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

11:06:37 Build Failed. 2 errors, 0 warnings. (took 147ms)
`

Colors are not correctly escaped.

With the beta release, the text between
11:06:37 **** Incremental Build of configuration Default for project Test ****
and
11:06:37 Build Failed. 2 errors, 0 warnings. (took 147ms)
is correctly colored.

The remaining issue is that color is lost for the first and last lines:
11:06:37 **** Incremental Build of configuration Default for project Test ****
and
11:06:37 Build Failed. 2 errors, 0 warnings. (took 147ms)

Can you reproduce the problem ?

from ansi-econsole.

mihnita avatar mihnita commented on June 12, 2024

Reproduced.

It was working fine for non-Makefile projects, and for the Makefile ones I just didn't see it.
The kind of thing where you look at it and don't see it :-)

And your fix seems to be right on.

I am adding it as a fix, but I need to do some proper testing before releasing.
Most likely this week-end.

Thanks!
Mihai

from ansi-econsole.

ydaveluy avatar ydaveluy commented on June 12, 2024

Sorry, there is a regression with this fix when a color is on multiple lines:

In the following example all lines should be green
`
[33;32mcolor is ok

no color here

color is ok [0m
`
If I have time this weekend I will investigate to find a better fix.

Yannick

from ansi-econsole.

ydaveluy avatar ydaveluy commented on June 12, 2024

Hello,

Feel free to discuss about the following PR:
https://github.com/mihnita/ansi-econsole/pull/76

Yannick

from ansi-econsole.

mihnita avatar mihnita commented on June 12, 2024

Sorry, I have a fix already. I will give it some time to test it, but seems to be fine.

from ansi-econsole.

mihnita avatar mihnita commented on June 12, 2024

OK, I've decided to not take the PR.
I have a fix already, and that PR did a big refactoring that seem to break some existing functionality.

from ansi-econsole.

mihnita avatar mihnita commented on June 12, 2024

Thank you for the attempt.

A new build published in the test folder, and my fix is already pushed to github.

I will test a bit more, and will release in a few days.

from ansi-econsole.

ydaveluy avatar ydaveluy commented on June 12, 2024

Hello Mihai,

Thanks for your answer.

I understand that my PR is big and there was functionalities I didn't know how to test.
I did this refactoring to solve random issues when launching the build of all projects in parallel (project->build all).
I performed more test today and it does not break existing functionalities: stdErrColor and hyperlinks are correctly working.

I don't want to insist but I encourage you to give it a try: https://github.com/ydaveluy/ansi-econsole/tree/bugfix/issue_75

Yannick

from ansi-econsole.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.