-
Notifications
You must be signed in to change notification settings - Fork 154
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
[1.13.1] Evaluating scmVersion.version
prevents further updates to the extension
#392
Comments
I'll look at this tomorrow! Thanks for detailed issue submission! |
@grational isn't that also Your case? |
Just FYI: logger.quiet("Invalid version $scmVersion.version")
scmVersion.tag.prefix = "prefix"
logger.quiet("Valid version $scmVersion.version") the latter will always print |
@mateuszkwiecinski I wanted to look into that, but I couldn't reproduce the issue. Would you mind sharing more details? I tried running plugins {
id 'pl.allegro.tech.build.axion-release' version '1.13.1'
}
logger.quiet("Invalid version $scmVersion.version")
afterEvaluate {
scmVersion.tag {
prefix = "prefix"
}
logger.quiet("Valid version $scmVersion.version")
version = scmVersion.version
} and plugins {
id 'pl.allegro.tech.build.axion-release' version '1.13.1'
}
logger.quiet("Invalid version $scmVersion.version")
scmVersion.tag.prefix = "prefix"
logger.quiet("Valid version $scmVersion.version") Both approaches resulted in the following output:
These are the commits I have in the repo (please note the tag).
And these are the tags:
|
@dominikbrandon Thanks for looking into the issue. Result you're getting |
Ok, I got it now. Thanks for the explanation. You're right that this gets cached. You can see that here. When you look inside the I can see two approaches here. First is to drop this caching mechanism, which sounds unsafe considering the fact that somebody explicitly made it work like that. We can only do that knowing the author's intention. Second is to introduce another method, e.g. @mateuszkwiecinski would such another accessor solve the problem for you? |
As I recall it was performance issue for big repositories, additional method sounds ok to me ;) |
Hi, sorry for bringing up an old issue, but I'm getting this while running a CI pipeline. The I'm depending on this output to do something else. Can I get some hint on overcoming this please? |
hi! |
No, it's a clean checkout via the the typical Azure Devops pipeline task. Strangely, it's working okay locally though. |
Maybe Azure isn't fetching the tags? |
It actually is, it's working in a different pipeline well. Can you hint anything please? What details might help you to help me? |
Context
Using Gradle extensions often requies caling
afterEvaluate
block to read user data as they are not available right after registering an extension.I have to defer configuring
axion-release-plugin
exactly for that reason. After migrating to 1.13.1 I noticed there is an additional limiatation introduced in that version.Repro steps
Given following code and having a tag
prefix1.2.3
on one of previous commits./gradlew currentVersion
will print1.2.3-SNAPSHOT
, which is expected.However, If I uncomment the code, the
./gardlew currentVersion
tasks returns0.1.0-SNAPSHOT
.Expected result
I'd expect evaluating
scmVersion.version
doesn't have side effects.Unfortunately I couldn't find in the code why it happens and what the consequences might be. That's definitely a behavior change when compared with 1.12.1 and doesn't seem to be expected behavior in Gradle ecosystem.
The text was updated successfully, but these errors were encountered: