Skip to content
New issue

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

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

Already on GitHub? # to your account

Run CLI on Shapeless #38

Closed
eed3si9n opened this issue Oct 4, 2023 · 4 comments · Fixed by #39
Closed

Run CLI on Shapeless #38

eed3si9n opened this issue Oct 4, 2023 · 4 comments · Fixed by #39

Comments

@eed3si9n
Copy link
Owner

eed3si9n commented Oct 4, 2023

steps

scala_import(
  name = "jar",
  tags = ["maven_coordinates=com.chuusai:shapeless_2.12", "maven_coordinates_and_version=com.chuusai:shapeless_2.12:2.3.2"],
  jars = ["@jvm__com_chuusai__shapeless//:shapeless_2.12.jar"],
  deps = [],
  exports = ["@jvm__org_scala_lang__scala_library//:jar", "@jvm__org_typelevel__macro_compat//:jar"],
  srcjar = "@jvm__com_chuusai__shapeless//:shapeless_2.12-sources.jar",
)

Problem

We're seeing this on Jenkins:

13:54:23 2023-10-04 17:54:23 Syntax error: Malformed input or input contains unmappable characters: shapeless/$tilde$qmark$greater$?.class
13:54:23 2023-10-04 17:54:23 Exception in thread "main" java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: shapeless/$tilde$qmark$greater$?.class
13:54:23 2023-10-04 17:54:23 at sun.nio.fs.UnixPath.encode(UnixPath.java:145)
13:54:23 2023-10-04 17:54:23 at sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
13:54:23 2023-10-04 17:54:23 at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279)
13:54:23 2023-10-04 17:54:23 at java.nio.file.Path.resolve(Path.java:515)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.next$1(Zip.scala:167)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.extract(Zip.scala:188)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.$anonfun$unzipStream$1(Zip.scala:153)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Using.apply(Using.scala:22)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.unzipStream(Zip.scala:153)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.$anonfun$unzip$1(Zip.scala:24)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Using.apply(Using.scala:22)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Zip$.unzip(Zip.scala:24)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Shader$.shadeFile(Shader.scala:20)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Main.process(Main.scala:21)
13:54:23 2023-10-04 17:54:23 at java.lang.reflect.Method.invoke(Method.java:566)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjar.MainUtil.runMain(MainUtil.java:39)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Main$.main(Main.scala:27)
13:54:23 2023-10-04 17:54:23 at com.eed3si9n.jarjarabrams.Main.main(Main.scala)
@eed3si9n
Copy link
Owner Author

eed3si9n commented Oct 4, 2023

Also not sure who is turning what into ?.

$ unzip -l $HOME/Downloads/shapeless_2.12-2.3.2.jar | head -n 12
Archive:  /Users/eyokota/Downloads/shapeless_2.12-2.3.2.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
     2505  11-02-2016 09:48   META-INF/MANIFEST.MF
        0  11-02-2016 09:48   shapeless/
     1654  11-02-2016 09:38   shapeless/$colon$colon$.class
     5328  11-02-2016 09:38   shapeless/$colon$colon.class
      933  11-02-2016 09:38   shapeless/$colon$plus$colon.class
     2105  11-02-2016 09:38   shapeless/$tilde$qmark$greater$.class
      921  11-02-2016 09:38   shapeless/$tilde$qmark$greater$++.class
     1458  11-02-2016 09:38   shapeless/$tilde$qmark$greater.class
      656  11-02-2016 09:38   shapeless/AdditiveCollection$$anon$1.class

@eed3si9n
Copy link
Owner Author

eed3si9n commented Oct 4, 2023

On Linux actually:

$ unzip -l shapeless_2.12-2.3.2.jar  | head -n 12
Archive:  shapeless_2.12-2.3.2.jar
  Length      Date    Time    Name
---------  ---------- -----   ----
     2505  2016-11-02 09:48   META-INF/MANIFEST.MF
        0  2016-11-02 09:48   shapeless/
     1654  2016-11-02 09:38   shapeless/$colon$colon$.class
     5328  2016-11-02 09:38   shapeless/$colon$colon.class
      933  2016-11-02 09:38   shapeless/$colon$plus$colon.class
     2105  2016-11-02 09:38   shapeless/$tilde$qmark$greater$.class
      921  2016-11-02 09:38   shapeless/$tilde$qmark$greater$╬╗.class
     1458  2016-11-02 09:38   shapeless/$tilde$qmark$greater.class
      656  2016-11-02 09:38   shapeless/AdditiveCollection$$anon$1.class

@johnynek
Copy link
Collaborator

johnynek commented Oct 4, 2023

is that ++ a single grapheme that is actually some unicode thing?

@eed3si9n
Copy link
Owner Author

eed3si9n commented Oct 4, 2023

https://github.com/milessabin/shapeless/blob/v2.3.10/core/src/main/scala/shapeless/hmap.scala#L56-L58

class ~?>[K[_], V[_]] extends Serializable {
  class λ[K, V] extends Serializable
}

I think it's Latin-1 trying to render Unicode lambda λ, or vice versa.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants