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

Fix #134 for publishing with mill 0.12 #137

Closed
wants to merge 1 commit into from

Conversation

carlosedp
Copy link
Contributor

Fixes issue:

❯ ./mill io.kipp.mill.ci.release.ReleaseModule/publishAll
[68/68] ============================== io.kipp.mill.ci.release.ReleaseModule/publishAll ==============================
java.util.NoSuchElementException: head of empty list
    scala.collection.immutable.Nil$.head(List.scala:663)
    scala.collection.immutable.Nil$.head(List.scala:662)
    mill.resolve.Resolve$.$anonfun$instantiateCommand$1(Resolve.scala:151)

This is related to how the Discover method finds the commands in the plugin.

@carlosedp
Copy link
Contributor Author

@nightscape @ckipp01 I've managed to fix the plugin with this PR.

@nightscape
Copy link
Contributor

@carlosedp I tried another approach where I reversed the traits and objects in the source-specific sub-folders:
https://github.com/ckipp01/mill-ci-release/pull/140/files
If I understood Li Haoyi's comment in Discord correctly, the issue is that the mill.define.Discover needs to be in an object.
How did you test your branch? Did you publishLocal a version of the plugin and then try it on some other project?

@carlosedp
Copy link
Contributor Author

Gonna take a loot at it!
Yes, you __.publishLocal and use the generated snapshot version in a test project.

@carlosedp
Copy link
Contributor Author

Closed in favor of #140 which has less code duplication.

@carlosedp carlosedp closed this Jan 6, 2025
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