Comments (15)
@gmazzo maybe you can provide a simple project to reproduce the error?
Here is it:
https://github.com/gmazzo/gradle-git-versioning-plugin-cc-issue
Run ./gradlew --stop && ./gradlew build
to get the issue.
Here is a scan of it also:
https://scans.gradle.com/s/bs5gyy43tlebc
from gradle-git-versioning-plugin.
Hey, I got corona :-/ so probably I'll look a this next week.
from gradle-git-versioning-plugin.
I hope you feel better soon @qoomon!
I think what might work is putting every JGit calls inside a ValueSource
, to be computed lazily. That should allow Gradle to fingerprint the property.
from gradle-git-versioning-plugin.
Unfortunately I am not able to reproduce the issue :-/
I run ./gradlew --configuration-cache version
multiple times, without any error
Gradle Version: 8.1.1
Plugin Version: 6.4.2
from gradle-git-versioning-plugin.
@gmazzo thanks a lot that works or actually it doesn't :-D
from gradle-git-versioning-plugin.
I don't know how to reset it after it work once.
Kill the daemon, that worked to me every time: ./gradlew --stop && ./gradlew xxx
from gradle-git-versioning-plugin.
Researching a bit deeper, it seems this is actually caused by JGIT implementation, I am right? I thought JGIT was a pure java implementation, why is running the host git
command? 🤔
from gradle-git-versioning-plugin.
I'd say this issue is caused by JGit and every plugin that relies on it will face the same. It seems it's accessing .gitconfig
on ins initialization by a couple of git
commands and that is causing to Gradle's Configuration Cache to fail:
from gradle-git-versioning-plugin.
Yeah no hurries. I was talking a look and it seems there is no way no hook on jgit
to delegate the process creation to Gradle's exec
.
So one option will be to ask for it, or open a PR, but probably is going to be a long process.
Another one will be to check if you can not depend on it at all, and just make raw git
commands with exec
.
from gradle-git-versioning-plugin.
Felling better right? Sorry I missed that comment 😅
Unfortunately I am not able to reproduce the issue :-/
That's strange 🤔, maybe it's not done all the time? I think it's worth wrapping it in a provider anyway, as the GIT case is actually their main example of it
I have too much on my plate right now (between work, personal plugins, and other contributions) but I'll keep it in the agenda for later if no one else can do it.
from gradle-git-versioning-plugin.
@gmazzo maybe you can provide a simple project to reproduce the error?
from gradle-git-versioning-plugin.
It's totally strange to me, it fails the first time i run ./gradlew version
the second time it works just as expected.
Even if I remove the ./gradle
folder it still works.
from gradle-git-versioning-plugin.
Same here, I think it should be caused by some static initialization of jgit.
from gradle-git-versioning-plugin.
I don't know how to reset it after it work once.
from gradle-git-versioning-plugin.
even after removing .git and .gradle dir it still works
from gradle-git-versioning-plugin.
Related Issues (20)
- How to configure previous tag + -SNAPSHOT using GitHub Actions? HOT 5
- Tag refs ignored, pattern not recognised HOT 3
- How to use within a multi-module Gradle project? HOT 6
- Tag version issue with 6.4.0 when running in CircleCI HOT 5
- Latest release named 9.4.1 HOT 1
- Placeholder default value and describe.tag do not appear compatible
- Shortcut for next version bumped by major/minor/patch HOT 2
- org.eclipse.jgit.errors.MissingObjectException: Missing unknown <commit hash here> HOT 4
- release new version with updated version of dependency org.eclipse.jgit:org.eclipse.jgi HOT 3
- Clarify docs on ordered selection HOT 2
- [6.1.0] `./gradlew version` fails with "invalid provided ref nkiesel/main/StringBuilder - needs to start with refs/" HOT 16
- JVM compatibility error in buildSrc HOT 6
- ${describe.tag} behaviour inconsistent with $(git describe) HOT 5
- error message: Object [full hash of commit] is not a commit. HOT 10
- Plugin does not detect merged tags HOT 8
- Does it work with Java 8? HOT 6
- How to define the <VERSION> pattern. HOT 9
- describe.tag.version.major couses java.lang.NullPointerException when none tag fit to pattern HOT 5
- Improve compatibility with Gradle Configuration Cache HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-git-versioning-plugin.