Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@julienrf
Copy link
Collaborator

@julienrf julienrf commented Jan 27, 2023

No description provided.

case Left(_) => desc.artifacts(cache, verbosity)
case Left(_) =>
if (verbosity >= 0)
System.err.println("Prebuilt launcher not found, trying to build the app from classfiles")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now, cs install --verbose --install-platform aarch64-apple-darwin sbtn explains slightly better the cause of the failure:

Using install directory /home/julien/.local/share/coursier/bin
https://repo1.maven.org/maven2/io/get-coursier/apps/maven-metadata.xml
  No new update since 2022-12-21 14:05:06
Found app sbtn in channel io.get-coursier:apps
Checking prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.zip
Found prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.zip (4.0 KiB)
Checking prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.zip
Found prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.2/sbt-1.8.2.zip (4.0 KiB)
Checking prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.1/sbt-1.8.1.zip
Found prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.1/sbt-1.8.1.zip (4.0 KiB)
Checking prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.0/sbt-1.8.0.zip
Found prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.8.0/sbt-1.8.0.zip (4.0 KiB)
Checking prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.7.3/sbt-1.7.3.zip
Found prebuilt launcher at https://github.com/sbt/sbt/releases/download/v1.7.3/sbt-1.7.3.zip (4.0 KiB)
Prebuilt binary not found, trying to build the app from classfiles
…
No main class found

I think in the case of sbtn we don’t really want to build the launcher ourselves, do we? I’ve seen there is a setting preferPrebuilt, maybe we should have something finer-grained like RequirePrebuilt, PreferBrebuilt, and NoPreference?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I see that you even suggested to fail in case the prebuilt launcher is not found instead of even trying to build it ourselves: coursier/apps#175 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, ideally I'd like to get rid of the code building launchers

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What would be the steps to get there?

Copy link
Member

Choose a reason for hiding this comment

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

I guess we could just remove that code now…

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you mean removing the println I added, or removing the code that tries to build the launcher?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just removed the println.

Copy link
Member

@alexarchambault alexarchambault left a comment

Choose a reason for hiding this comment

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

Looks good!

@julienrf Could you edit the first 3 commits, so that they're properly formatted upfront and the "scalafmt" commit isn't needed? That way, we can merge with a standard merge (and keep a clean git history in the main branch). (I'd be ok editing the commits myself, if I had the right to push commits to the PR branch - but PR edits by maintainers was disabled when you opened the PR it seems)

@julienrf julienrf changed the title Add more logs in case of failure to install a prebuilt launcher Check that all the apps are installed, document the prebuiltBinaries entries Jan 30, 2023
@alexarchambault alexarchambault merged commit e7f6855 into coursier:main Feb 16, 2023
@julienrf julienrf deleted the some-changes branch February 16, 2023 09:42
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