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

shader renames jansi #1977

Merged
merged 5 commits into from
Jun 14, 2024
Merged

shader renames jansi #1977

merged 5 commits into from
Jun 14, 2024

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Jun 13, 2024

This PR uses the shader to move the org.fusesource.jansi package to org.rascalmpl.fusesource.jansi. Doing this prevents a later collision between jansi versions inside of the mvn runtime.

Some collatoral fix: For -B mvn batch mode the monitor did not print intermediate steps anymore. Fixed that too.

@jurgenvinju jurgenvinju requested a review from DavyLandman June 13, 2024 19:13
@jurgenvinju jurgenvinju self-assigned this Jun 13, 2024
Copy link

codecov bot commented Jun 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49%. Comparing base (d7922b6) to head (5930198).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #1977   +/-   ##
=======================================
  Coverage       49%     49%           
- Complexity    6261    6272   +11     
=======================================
  Files          665     665           
  Lines        59622   59624    +2     
  Branches      8645    8645           
=======================================
+ Hits         29391   29406   +15     
+ Misses       28033   28019   -14     
- Partials      2198    2199    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DavyLandman
Copy link
Member

DavyLandman commented Jun 14, 2024

On windows the jar produced cannot be used as a REPL:

❯ java -jar target/rascal-0.40.2-SNAPSHOT.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.rascampl.fusesource.jansi.internal.Kernel32.init()'
        at org.rascampl.fusesource.jansi.internal.Kernel32.init(Native Method)
        at org.rascampl.fusesource.jansi.internal.Kernel32.<clinit>(Kernel32.java:38)
        at org.rascalmpl.shell.RascalShell.setupWindowsCodepage(RascalShell.java:130)
        at org.rascalmpl.shell.RascalShell.main(RascalShell.java:44)

most likely due to the native bindings:

  public static final native long malloc(@JniArg(cast = "size_t") long var0);

   public static final native void free(@JniArg(cast = "void *") long var0);

   public static final native int SetConsoleTextAttribute(@JniArg(cast = "HANDLE") long var0, short var2);

   public static final native int CloseHandle(@JniArg(cast = "HANDLE") long var0);

   public static final native int GetLastError();

@DavyLandman
Copy link
Member

Ok, I've also had to relocate jline and make an exception for org.rascampl.fusesource.jansi.internal.*.

Now it seems to work on my machine.

Copy link
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the config to work on Windows.

@DavyLandman DavyLandman marked this pull request as ready for review June 14, 2024 09:17
@DavyLandman DavyLandman merged commit bd3d5dd into main Jun 14, 2024
7 checks passed
@DavyLandman DavyLandman deleted the shader-renames-jansi branch June 14, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants