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

My Scala Steward app is breaking on a Mill repo #3478

Open
nafg opened this issue Nov 19, 2024 · 3 comments
Open

My Scala Steward app is breaking on a Mill repo #3478

nafg opened this issue Nov 19, 2024 · 3 comments

Comments

@nafg
Copy link
Contributor

nafg commented Nov 19, 2024

I'm using https://github.com/nafg/nafg-scala-steward (based on https://github.com/armanbilge/diy-steward) for some of my repos and for the last few weeks it's been failing. The error is:

  2024-11-19 04:16:07,625 INFO  ──────────── Steward nafg/scala-grist ────────────
  2024-11-19 04:16:07,625 INFO  Check cache of nafg/scala-grist
  2024-11-19 04:16:08,008 INFO  Clone nafg/scala-grist
  2024-11-19 04:16:08,280 INFO  Refresh cache of nafg/scala-grist
  2024-11-19 04:16:08,354 INFO  Get dependencies in . from Mill
  2024-11-19 04:16:24,430 ERROR Steward nafg/scala-grist failed
  org.scalasteward.core.buildtool.mill.parser$CirceParseError: Failed to decode Modules
      at org.scalasteward.core.buildtool.mill.parser$.$anonfun$parseModules$1(parser.scala:43)
      at cats.syntax.EitherOps$.leftMap$extension(either.scala:193)
      at org.scalasteward.core.buildtool.mill.parser$.parseModules(parser.scala:43)
      at org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:85)
      at map @ org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:84)
      at map @ org.scalasteward.core.buildtool.mill.MillAlg.$anonfun$getProjectDependencies$1(MillAlg.scala:84)
      at main$ @ org.scalasteward.core.Main$.main(Main.scala:23)
      at timeoutAndForget @ org.scalasteward.core.io.process$.$anonfun$slurp$3(process.scala:85)
      at adaptErr$extension @ org.scalasteward.core.update.artifact.ArtifactMigrationsLoader.decodeMigrations(ArtifactMigrationsLoader.scala:50)
      at delay @ org.scalasteward.core.io.process$.$anonfun$slurp$1(process.scala:63)
  Caused by: io.circe.ParsingFailure: expected whitespace or eof got '..' (line 95, column 1)
  2024-11-19 04:16:24,432 INFO  ──────────── Total time: Steward nafg/scala-grist: 16s 807ms ────────────

However if I try to simulate it locally, not only does the output not explain the error, there is no line 95:

❯ mill --no-server --disable-ticker --import "ivy:org.scala-steward::scala-steward-mill-plugin::0.18.0" show org.scalasteward.mill.plugin.StewardPlugin/extractDeps | cat -n
[build.mill] [info] compiling 1 Scala source to /home/naftoli/repositories/github.com/nafg/scala-grist/out/mill-build/compile.dest/classes ...
[build.mill] [info] done compiling
     1	{
     2	  "modules": [
     3	    {
     4	      "name": "core[3.4.2]",
     5	      "repositories": [
     6	        {
     7	          "url": "https://repo1.maven.org/maven2",
     8	          "type": "maven",
     9	          "auth": null,
    10	          "headers": null
    11	        }
    12	      ],
    13	      "dependencies": [
    14	        {
    15	          "groupId": "io.circe",
    16	          "artifactId": {
    17	            "name": "circe-parser",
    18	            "maybeCrossName": "circe-parser_3"
    19	          },
    20	          "version": "0.14.10"
    21	        },
    22	        {
    23	          "groupId": "io.circe",
    24	          "artifactId": {
    25	            "name": "circe-generic",
    26	            "maybeCrossName": "circe-generic_3"
    27	          },
    28	          "version": "0.14.10"
    29	        },
    30	        {
    31	          "groupId": "dev.zio",
    32	          "artifactId": {
    33	            "name": "zio-http",
    34	            "maybeCrossName": "zio-http_3"
    35	          },
    36	          "version": "3.0.1"
    37	        },
    38	        {
    39	          "groupId": "org.scala-lang",
    40	          "artifactId": {
    41	            "name": "scala3-library",
    42	            "maybeCrossName": "scala3-library_3"
    43	          },
    44	          "version": "3.4.2"
    45	        }
    46	      ]
    47	    },
    48	    {
    49	      "name": "core[2.13.14]",
    50	      "repositories": [
    51	        {
    52	          "url": "https://repo1.maven.org/maven2",
    53	          "type": "maven",
    54	          "auth": null,
    55	          "headers": null
    56	        }
    57	      ],
    58	      "dependencies": [
    59	        {
    60	          "groupId": "io.circe",
    61	          "artifactId": {
    62	            "name": "circe-parser",
    63	            "maybeCrossName": "circe-parser_2.13"
    64	          },
    65	          "version": "0.14.10"
    66	        },
    67	        {
    68	          "groupId": "io.circe",
    69	          "artifactId": {
    70	            "name": "circe-generic",
    71	            "maybeCrossName": "circe-generic_2.13"
    72	          },
    73	          "version": "0.14.10"
    74	        },
    75	        {
    76	          "groupId": "dev.zio",
    77	          "artifactId": {
    78	            "name": "zio-http",
    79	            "maybeCrossName": "zio-http_2.13"
    80	          },
    81	          "version": "3.0.1"
    82	        },
    83	        {
    84	          "groupId": "org.scala-lang",
    85	          "artifactId": {
    86	            "name": "scala-library",
    87	            "maybeCrossName": null
    88	          },
    89	          "version": "2.13.14"
    90	        }
    91	      ]
    92	    }
    93	  ]
    94	}
@nafg
Copy link
Contributor Author

nafg commented Nov 19, 2024

Also there's no .., except for the ... in the first line, which seems to be on stderr rather than stdout, and besides if it somehow was trying to parse it concatenated to stdout it should fail long before that.

@nafg
Copy link
Contributor Author

nafg commented Nov 19, 2024

It would be good if when parsing failed, it would print the whole output that failed to parse. That might help determine what's really happening.

Anyway is that error the reason the job fails with Error: ✕ Launching scala-steward failed?

@yoohaemin
Copy link

I'm getting the exact same failure with the same error message.

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

No branches or pull requests

2 participants