trivial gradle task...

  task nocommitTmp {
    doLast {
        println System.getProperty("java.io.tmpdir")
        println File.createTempFile("foo",".bar").getAbsolutePath()
        println getTemporaryDir()
    }
  }


...spits out...


hossman@slate:~/lucene/lucene [j21] [*main] $ ./gradlew nocommitTmp

> Task :nocommitTmp
/home/hossman/lucene/lucene/.gradle/tmp
/home/hossman/lucene/lucene/.gradle/tmp/foo4193183057834353646.bar
/home/hossman/lucene/lucene/build/tmp/nocommitTmp



...so it looks like something in gradle (our gradle build, or some plugin 
we are using) is going out of it's way to use ~/.gradle/.tmp for these 
gradle-worker-classpath*txt files







: Date: Fri, 21 Mar 2025 08:47:39 -0700 (MST)
: From: Chris Hostetter <hossman_luc...@fucit.org>
: To: dev@lucene.apache.org
: Subject: Re: Warning: Gradle fills up some gradle-internal temp folder with
:     classpath files (millions of them accumulated)
: 
: 
: wait ... my mistake, the modification to gradlew does still exist (i 
: had a type when grepping for it)...
: 
: # LUCENE-9471: workaround for gradle leaving junk temp. files behind.
: GRADLE_TEMPDIR="$APP_HOME/.gradle/tmp"
: mkdir -p "$GRADLE_TEMPDIR"
: if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
:     GRADLE_TEMPDIR=`cygpath --path --mixed "$GRADLE_TEMPDIR"`
: fi
: DEFAULT_JVM_OPTS="$DEFAULT_JVM_OPTS \"-Djava.io.tmpdir=$GRADLE_TEMPDIR\""
: 
: 
: ...so no fucking clue why that doesn't work any more.
: 
: 
: : Date: Fri, 21 Mar 2025 08:45:44 -0700 (MST)
: : From: Chris Hostetter <hossman_luc...@fucit.org>
: : To: dev@lucene.apache.org
: : Subject: Re: Warning: Gradle fills up some gradle-internal temp folder with
: :     classpath files (millions of them accumulated)
: : 
: : 
: : : > and it is: ~/.gradle/.tmp
: : : >
: : : 
: : : It is dumb, I agree. I'll try to correct the current hack we have - not
: : : sure why it's written the way it is - it doesn't seem right (maybe it's
: : : changed over time).
: : 
: : It has....
: : 
: : The logic in gradle/hacks/wipe-temp.gradle was added as part of 
: : LUCENE-9471 which was intentionally modifing "gradlew" to use a lucene 
: : project specific temp dir instead of the user's "global" tmp dir -- but 
: : that change no longer exists in Lucene's copy of ./gradlew
: : 
: : https://issues.apache.org/jira/browse/LUCENE-9471
: : 
: : 
https://github.com/apache/lucene-solr/commit/581e836#diff-e9721dc750619a21053ddea8a5d04929a608877d8c5daec1b57d243d3424e745
: : 
: : 
: : -Hoss
: : http://www.lucidworks.com/
: : 
: 
: -Hoss
: http://www.lucidworks.com/
: 

-Hoss
http://www.lucidworks.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to