• Re: gradle reboot -- 2024W47 update

    From [email protected]@21:1/5 to All on Fri Nov 22 18:30:01 2024
    Good evening,

    Some news from this adventure:

    Le 2024-11-19 11:04, [email protected] a écrit :
    There is currently a regression compared to two weeks ago as I'm
    currently unable to get the build to start compiling the project, it
    hangs in a configuration stage. Currently investigating why

    I found out what triggered the issue, which was a combination of
    incomplete dependencies fixes/removals that missed the missing sources
    (still following?) newly imported (mostly testing code) and --write-verification-metadata being prone to deadlocks after errors
    happened in the configuration stage, which is probably worth a bug
    report upstream if I manage to craft a less exotic reproducer. Not
    getting any clue about what was wrong was frustrating to say the least,
    I had to debug the thing with jdb to figure that out.

    Now the build starts again, does not complain anymore about libnative-platform-java after an updated package was installed, and
    fails against another outdated lib, details are on the updated README
    there [1]

    I haven't received a lot of feedback (as in: none) from this list about
    what is in my repos yet, but that's still very welcome and encouraged ;)

    Next week I will start working on a detailed action plan and PoC for the rebootstrap, in between build runs and fixups.

    Have a nice week-end,



    [1]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/wip/README.md

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Dec 2 19:50:01 2024
    Good evening,

    Le 2024-11-22 18:25, [email protected] a écrit :
    Next week I will start working on a detailed action plan and PoC for
    the rebootstrap, in between build runs and fixups.

    Updating and then fixing the builds of various packages (not all of them
    direct dependencies of Gradle) kept me busier than expected, and thus
    the writing hasn't progressed much, though the reading and the thinking
    have. I added a bunch of links to the bottom of wip/README [1] if you
    are interested, and commented on a few GitHub issues for some shameless self-advertising.

    The build progressed a bit and now fails on the outdated Groovy; my
    current plan is to attempt to patch Gradle to make it build with the
    version currently in Debian, and make it work at least enough to be able
    to rebuild both Gradle itself and newer versions of Groovy with it.

    I also plan to patch Gradle 4.4.1 to make it work with the newer
    libkryo-java (that should be rather trivial) and libnative-platform-java
    and -jni (easy enough at first sight), to make the transition easier. I attempted the reverse (patching libraries to implement
    retrocompatibility) but that's not possible at least with kryo that
    changed return types of methods keeping the same names and argument
    types.

    I managed to get IDEA to sync the patched project now without errors and
    even in offline mode, which should help me with further patching deep
    into the internals of the beast, and you now have a shiny new
    debian/rules target to help you if you want to try that at home.

    Dependencies and reverse dependencies are now detailed in their own wip/document.md, that was a fairly tedious job for the dependencies but hopefully worth it, it allowed me to fix a few mistakes and learn a few
    things about Kotlin. There are actually much fewer direct dependencies
    than I thought initially, and also more of them that are up-to-date than
    I thought.

    I registered on mentors.debian.net and published packages there [2]
    (though I haven't uploaded all of them yet) if you want to try them
    without rebuilding, leave a review or, if you dare, upload the new
    `kryo` that currently breaks all two of its two reverse dependencies to experimental ^ ^.

    As usual, comments and contributions are welcome.

    Cheers,


    [1]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/wip/README.md
    [2]: https://mentors.debian.net/packages/uploader/[email protected]/

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Dec 9 12:10:01 2024
    Good day,

    Some news about the ongoing work on Gradle packaging:

    Le 2024-12-02 19:43, [email protected] a écrit :
    The build progressed a bit and now fails on the outdated Groovy

    Last week the build progressed some more and now (using --continue)
    generates 78 of the 83 (86 minus 3 dropped) jars that are expected in
    the binary distribution (that's almost 94%). Some Groovy issues were
    solved by copypasting some newer Groovy source code right into the
    project; that's indeed temporary and only necessary until Groovy gets
    updated, and I plan to take care of that right after Gradle.

    Now the build fails on Kotlin issues. These are going to be tougher
    (getting it to build is one thing, getting it to actually work is
    another thing) and my current plan to try to use the version that is
    currently in Debian is likely to be a dead end for reasons already
    stated on this list. I already had to drop the new declarative DSL as it
    is not (yet?) needed for rebuilding Gradle (I didn't check for Kotlin
    though) and makes use of many new features that were possibly added to
    Kotlin as part of the collaboration between Gradle and JetBrains. What
    remain are the regular kotlin-dsl and some parts of core-configuration
    written in Kotlin, which are all necessary for core features and
    rebuilding both Gradle and Kotlin.

    I will see this week how far I can go with this plan. The alternative
    would be to upgrade Kotlin at the same time, with similar (but a bit
    more complicated) bootstrapping techniques.

    Which brings us to the crucial subject of bootstrapping: I now have a (non-functional) PoC of how I plan to proceed, which is basically to
    make it possible to rebuild Gradle with a plain old Makefile [1],
    automatically generated from Gradle build scripts, to be updated with
    every new release and committed to the repository as part of the
    packaging sources. For the rebootstrap this would go as follows
    (assuming that all issues that would prevent Gradle from working are
    already resolved):
    - maintainer uses a binary distribution of Gradle from upstream to build
    a first-stage patched Gradle and to generate the Makefile; that build
    will not be used and is only necessary to correctly generate the
    Makefile
    - maintainer rebuilds a first stage patched Gradle using the Makefile
    - maintainer builds a second stage patched Gradle using the
    Makefile-built Gradle, check that it works (test suites), check that it generates the same Makefile as the binary distribution, eventually
    checks and investigates for differences in binaries against the
    first-stage build with binary distribution
    - maintainer commits packaging updates
    - for the CI (or anybody else after the package is published) to rebuild
    the package, debian/rules checks the version of Gradle that is currently installed on the system; if the version is not known (i.e. successfully
    tested) to be compatible (and this is probably going to be a very
    restricted set of versions close to the one being built), d/rules will
    build a first-stage Gradle using the pre-generated Makefile, then
    (re)build the target Gradle using a temporary installation of the
    first-stage Gradle.

    As usual, comments and contributions are very welcome.

    Cheers,


    [1]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/gradle.Makefile
    — this Makefile is not useable as is, but you get the idea

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Emmanuel Bourg@21:1/5 to All on Mon Dec 9 14:40:01 2024
    Le 09/12/2024 à 12:08, [email protected] a écrit :

    As usual, comments and contributions are very welcome.

    Sounds good so far. Regarding the bootstrapping, once the initial
    version is uploaded I don't think we should try too hard to keep the bootstrapping logic in the package, that'll most certainly be tedious to maintain over time.

    Emmanuel Bourg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Mon Dec 9 19:00:01 2024
    Le 2024-12-09 14:32, Emmanuel Bourg a écrit :

    I don't think we should try too hard to keep the bootstrapping logic in
    the package, that'll most certainly be tedious to maintain over time.

    Well that's indeed something to think about, and I am a bit worried
    about that as well. With Gradle, the work necessary to maintain the bootstrapping in working condition will have to be weighted against the
    work necessary to patch and downgrade the build scripts to make them
    work with a previous release, which may or may not be that easy
    depending on feature gaps between Gradle releases.

    Gradle authors made it pretty clear that they actively upgrade Gradle
    build scripts to use the latest features available (aka "dogfooding").
    Even if Debian maintainers managed to ship every Gradle final release,
    new majors releases were so far never built with a final release, but
    rather pre-releases or snapshots of the new major release [1]. This also happens for minor releases, though changes in build scripts are less
    drastic and some minor releases are probably (untested so far but worth testing) going to build with some previous releases.

    AFAIK the current Debian Policy doesn't say much about bootstrapping
    build tools i.e. which exceptions to the usual rules might be admissible
    or not in these cases. Fedora provides some guidelines [2] [3] that seem reasonable. My personal opinion is that making such tools bootstrappable
    would be a good practice, but that it's ultimately the job of the
    upstream developers to provide the means to bootstrap their products. It
    has always been (AFAIK) possible to build GNU Make without GNU Make.
    Their authors now make it possible to build GNU Make without any "make"
    at all [4]. It is almost possible to build SBT without SBT [5].
    Unfortunately the feedback we've got from Gradle leads so far is that
    they don't care much about that issue.

    But I would leave it to the maintainer of the day to decide whether they
    want to maintain the bootstrapping in working condition or not. I
    promise not to bark and bite if they don't ^ ^. Though I think that even
    if the tool breaks at some point, keeping the parts around in the
    toolbox just in case they are needed again later would be wise.

    That said, I'm actually marginally outdoing the Gradle folks with my
    approach as I assume that any release will be buildable by the same
    release, which may not always be true, and I would not be surprised if
    Gradle authors stated at some point that it is not among their goals,
    but it's much more convenient to assume that and I believe that this is
    going to work most of the time with no (or little) changes.


    [1]: https://salsa.debian.org/-/snippets/756
    [2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be-packaged/#_exceptions
    [3]:
    https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping
    [4]: https://git.savannah.gnu.org/cgit/make.git/tree/bootstrap
    [5]: https://github.com/sbt/sbt/blob/1.10.x/DEVELOPING.md#running-sbt-from-source---sbton
    — spoiler, as the wishlist season is officially opened: I added "package SBT" on my to-do list for 2025.

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans-Christoph Steiner@21:1/5 to All on Mon Dec 9 19:20:01 2024
    [email protected]:
    Le 2024-12-09 14:32, Emmanuel Bourg a écrit :

    I don't think we should try too hard to keep the bootstrapping logic in the >> package, that'll most certainly be tedious to maintain over time.

    Well that's indeed something to think about, and I am a bit worried about that
    as well. With Gradle, the work necessary to maintain the bootstrapping in working condition will have to be weighted against the work necessary to patch
    and downgrade the build scripts to make them work with a previous release, which
    may or may not be that easy depending on feature gaps between Gradle releases.

    Gradle authors made it pretty clear that they actively upgrade Gradle build scripts to use the latest features available (aka "dogfooding"). Even if Debian
    maintainers managed to ship every Gradle final release, new majors releases were
    so far never built with a final release, but rather pre-releases or snapshots of
    the new major release [1]. This also happens for minor releases, though changes
    in build scripts are less drastic and some minor releases are probably (untested
    so far but worth testing) going to build with some previous releases.

    AFAIK the current Debian Policy doesn't say much about bootstrapping build tools
    i.e. which exceptions to the usual rules might be admissible or not in these cases. Fedora provides some guidelines [2] [3] that seem reasonable. My personal
    opinion is that making such tools bootstrappable would be a good practice, but
    that it's ultimately the job of the upstream developers to provide the means to
    bootstrap their products. It has always been (AFAIK) possible to build GNU Make
    without GNU Make. Their authors now make it possible to build GNU Make without
    any "make" at all [4]. It is almost possible to build SBT without SBT [5]. Unfortunately the feedback we've got from Gradle leads so far is that they don't
    care much about that issue.

    But I would leave it to the maintainer of the day to decide whether they want to
    maintain the bootstrapping in working condition or not. I promise not to bark and bite if they don't ^ ^. Though I think that even if the tool breaks at some
    point, keeping the parts around in the toolbox just in case they are needed again later would be wise.

    That said, I'm actually marginally outdoing the Gradle folks with my approach as
    I assume that any release will be buildable by the same release, which may not
    always be true, and I would not be surprised if Gradle authors stated at some point that it is not among their goals, but it's much more convenient to assume
    that and I believe that this is going to work most of the time with no (or little) changes.


    [1]: https://salsa.debian.org/-/snippets/756
    [2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/what-can-be- packaged/#_exceptions
    [3]: https://docs.fedoraproject.org/en-US/packaging-guidelines/#bootstrapping [4]: https://git.savannah.gnu.org/cgit/make.git/tree/bootstrap
    [5]: https://github.com/sbt/sbt/blob/1.10.x/DEVELOPING.md#running-sbt-from- source---sbton
         — spoiler, as the wishlist season is officially opened: I added "package
    SBT" on my to-do list for 2025.

    I also think that your bootstrapping plan sounds good. And I second that I don't think it is so important to maintain the bootstrapping Makefile. It'll always be in git for anyone who wants to go back to it. I think it would be fine to keep in place, as long as the workflow is documented, e.g. the bootstrapping is not required to be maintained, but it would be nice to have.

    .hc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Dec 10 10:40:01 2024
    Le 2024-12-09 19:17, Hans-Christoph Steiner a écrit :
    I think it would be fine to keep in place, as long as the workflow is documented, e.g. the bootstrapping is not required to be maintained,
    but it would be nice to have.

    It's probably not as complicated to maintain as it may look right now,
    let me give some details about how I see future maintainer work wrt/
    this.

    The makefile is automatically generated by a new "makeMakefile" gradle
    task that is added by the custom plugin. My goal is to make it work as generated with no further postprocessing, especially no manual editing.
    It is only intended to (re)build the version of Gradle from which is was generated, as a fallback method for a first stage build if the Gradle
    currently installed on the system is not usable for the build. IOW it's
    there to prevent some FTBFS cases.

    When importing a new Gradle release:
    - either the build succeeds out of the box with the version of Gradle
    currently installed on the system. In that case the Makefile will be automatically updated as part of a manual build of the package (the task
    would be skipped by default if the makefile version matches the package version). The maintainer only has to commit it as part of packaging
    updates.
    - or the system Gradle fails to build the new release. In that case the maintainer has basically two choices: either downgrade the build scripts
    to make them work with the system Gradle, and then they are back to the
    same situation as above, or go through the bootstrap process again, and
    in that case a new Makefile will be generated and used as part of the
    bootstrap process.

    Of course all of this is going to be documented, and I'm also planning
    to automate the bootstrap process (download the binary dist and
    dependencies, setup a temporary installation, first stage builds etc).

    Testing that the Makefile fallback actually works could be done by the maintainer, but I think it would be more convenient to delegate that to
    some custom CI pipeline on Salsa that is allowed to fail so the
    maintainer won't be blocked to proceed with an upgrade if that's the
    only thing that breaks.

    And if that's the makeMakefile task that breaks, which I think is less
    likely than future issues with the rest of the custom build logic, they
    can just comment out the bits in debian/rules if they don't want to fix
    it.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Fri Dec 13 19:40:01 2024
    Good evening,

    Here is a quick report about the (little) progress made this week.

    Le 2024-12-09 12:08, [email protected] a écrit :
    Now the build fails on Kotlin issues.

    And now I'm stuck on the (re)build of Kotlin 1.3.31 that currently FTBFS
    [1].

    I will see this week how far I can go with this plan.

    Not very far indeed, as was expected: I quickly realized that Gradle now depends on APIs that were introduced with Kotlin 1.3.50, not much later
    than the current Debian version. After downloading the ~4GiB Kotlin git
    repo (and running git gc --aggressive to claim back over 2 GiB) I tried
    to figure out if backporting some code from that version into Kotlin
    1.3.31 could work by copypasting the relevant parts of Kotlin sources
    into the Gradle project, just prefixing the package names as I did with
    Groovy. At some point I faced a wall: some of these parts are not in the
    repo, as they are generated during the build of Kotlin (protobuf etc).

    That got me into rebuilding the Kotlin package, which I haven't achieved
    so far. I started from what's in the `master` branch with the patches of Vladimir Petko to rebuild with Java 21, repatched to rebuild with Java
    11 as the installed Kotlin compiler won't run with Java 21, and then got
    stuck on errors [2] that don't make sense to me, especially that one:

    error: type mismatch: inferred type is org.jetbrains.org.objectweb.asm.tree.MethodNode but MethodNode! was
    expected

    I also tried to rebuild the last published tag but it fails on the same
    error. To me, it looks like either a name clash with two different
    versions of the class (but I can't figure out what/where the other
    version could be), or a compiler bug. Unless someone here could give me
    some clue about what's going on, I will probably have to dive into some
    jdb debugging session, as IDEA won't sync/build/debug/highlight the
    project due to the outdated Gradle.

    Anyway, the current plan for next week is still to fix the Kotlin build,
    or maybe decompile pregenerated classes, and try to figure out whether a backport of the necessary APIs is reasonably achievable.

    RFS: is any DD from the Java Team willing to act as a sponsor for a few
    weeks to proceed with the reviews and uploads to experimental and
    unstable? (if not I would have to file a RFS bug)

    Also would you allow me into the java group on Salsa so I can start
    working directly on some repos?

    Cheers,


    [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057513
    [2]: http://paste.debian.net/1339720/

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Emmanuel Bourg@21:1/5 to All on Sat Dec 14 00:40:01 2024
    Le 13/12/2024 à 19:31, [email protected] a écrit :

    That got me into rebuilding the Kotlin package, which I haven't achieved
    so far. I started from what's in the `master` branch with the patches of Vladimir Petko to rebuild with Java 21, repatched to rebuild with Java
    11 as the installed Kotlin compiler won't run with Java 21, and then got stuck on errors [2] that don't make sense to me, especially that one:

    error: type mismatch: inferred type is
    org.jetbrains.org.objectweb.asm.tree.MethodNode but MethodNode! was
    expected

    I tried building kotlin this week and stumbled on the same issue.
    Tweaking the signature of the abstract method and/or its implementations
    didn't work. I'm thinking about rebuilding a clean kotlin package in
    bookworm with the Java 21 patches and then uploading it to unstable to
    get out of this.

    RFS: is any DD from the Java Team willing to act as a sponsor for a few
    weeks to proceed with the reviews and uploads to experimental and
    unstable? (if not I would have to file a RFS bug)

    I can review your changes. Don't bother with the RFS, you can open PRs
    on Salsa and ping us here.

    Emmanuel Bourg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Klose@21:1/5 to [email protected] on Sat Dec 14 10:50:01 2024
    On 09.12.24 18:56, [email protected] wrote:
    Le 2024-12-09 14:32, Emmanuel Bourg a écrit :

    I don't think we should try too hard to keep the bootstrapping logic
    in the package, that'll most certainly be tedious to maintain over time.

    Well that's indeed something to think about, and I am a bit worried
    about that as well. With Gradle, the work necessary to maintain the bootstrapping in working condition will have to be weighted against the
    work necessary to patch and downgrade the build scripts to make them
    work with a previous release, which may or may not be that easy
    depending on feature gaps between Gradle releases.

    what about having two sets of packages? one set encapsulating the
    bootstrap, which always stays in unstable, and one "production" set,
    which then migrates to testing? Would that be better to keep the
    bootstrap knowledge up to date?

    Matthias

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Sat Dec 14 11:50:01 2024
    Le 2024-12-14 10:48, Matthias Klose a écrit :

    what about having two sets of packages? one set encapsulating the
    bootstrap, which always stays in unstable, and one "production" set,
    which then migrates to testing? Would that be better to keep the
    bootstrap knowledge up to date?

    That's a possibility, though I would keep them in the same repo and
    manage them using branches, and maybe keep the bootstrap packages only
    in experimental. We are going to need branches to maintain the gradleN
    packages anyway (only support and no opposition so far for renaming to
    gradleN, so we are going this way). But I think having the makefile as a
    backup build method even in production is worth considering, as it's
    very likely that without it some upgrades will require much more work to downgrade their build scripts so they work with the currently packaged
    version, if that's possible at all. It also sort of breaks the circular dependency, and I think that's good practice.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthias Klose@21:1/5 to [email protected] on Sat Dec 14 13:20:01 2024
    On 14.12.24 11:49, [email protected] wrote:
    Le 2024-12-14 10:48, Matthias Klose a écrit :

    what about having two sets of packages? one set encapsulating the
    bootstrap, which always stays in unstable, and one "production" set,
    which then migrates to testing? Would that be better to keep the
    bootstrap knowledge up to date?

    That's a possibility, though I would keep them in the same repo and
    manage them using branches, and maybe keep the bootstrap packages only
    in experimental.

    experimental is fine, as long as there are no architecture dependent
    packages involved. re-bootstrapping then in unstable is a pain.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to All on Tue Dec 17 12:00:01 2024
    Hi,

    For information:

    Yesterday I tried to rebuild (on trixie) the 110 identified source
    packages that depend on Gradle. That kept my low-end, second-hand laptop
    busy for about 5 hours. Most packages (102, ~93%) were rebuilt without
    issues. The 8 packages that failed to build OOTB were:

    1. android-framework-23
    2. android-platform-external-doclava
    3. android-platform-tools-base
    4. gradle-kotlin-dsl
    5. kotlin
    6. kotlinx-atomicfu
    7. kotlinx-coroutines
    8. zeroc-ice

    #1 and #2 already had FTBFS bugs unresolved since 2022, are severely
    outdated and their former uploader is not listed as a DD anymore (he
    requested to be removed as uploader of several packages in 2022 but is
    still listed in a few ones, these would require some final cleanup).
    These packages need a full overhaul and are not worth fixing in their
    current state so we can ignore them for now.

    #3 has a FTBFS bug unresolved since Aug 2024, is also severely outdated
    (2017), and overall same verdict as above.

    #4 to #7 fail because the current Kotlin compiler won't run with Java 21
    (class files version 65). I'm currently working on this as part of the
    Kotlin 1.3.31 rebuild issue.

    #8 failed because it depends on an updated PHP that was not yet in
    testing. It succeeded after manually installing the required dependency.

    The good news here is that right now nothing (else) needs to be fixed to rebuild with the current Gradle 4.4.1.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Emmanuel Bourg@21:1/5 to All on Wed Dec 18 10:00:01 2024
    Le 17/12/2024 à 11:54, [email protected] a écrit :

    android-platform-tools-base has a FTBFS bug unresolved since Aug 2024,
    is also severely outdated(2017), and overall same verdict as above.

    Kotlin depends on libgradle-android-plugin-java which is built by android-platform-tools-base, we can't remove it.

    Emmanuel Bourg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Dec 20 19:20:01 2024
    Good evening,

    Not much progress was made on Gradle this week:

    Le 2024-12-13 19:31, [email protected] a écrit :
    now I'm stuck on the (re)build of Kotlin 1.3.31 that currently FTBFS

    I'm still there. I managed to use IDEA CE's debugger instead of jdb
    which helps a lot and narrowed down the issue to some subtle failure in
    class resolution that could happen either in Kotlin code or in libintellij-core-java or both, but I haven't nailed it yet, though I
    think I'm getting close. The trip deep inside the compiler internals is interesting but it requires a lot of patience and focus as the internal
    code is rather scarcely documented and the way things are named and
    structured not always intuitive.

    This project will be on a break next week so the next report will be in January, maybe even week 02 depending on my progress. Until then I will
    try to wrap up some of my work on dependencies to get these out of the
    way.

    I'm also going to delay the update to Gradle 8.12 that was released a
    few hours ago for mainly two reasons:
    - the new release now depends on a file events library that was split
    from native-platform and isn't packaged yet (the ITP is already filed);
    also that split would complicate a bit more the upgrade path that I'm
    planning for Gradle (and possibly Kotlin as well)
    - I would like someone else to proceed with that update to make sure the maintainer documentation makes it possible for others to maintain the
    package, and I haven't yet started to work on that documentation.

    That said, I wish happy end of year celebrations to those that will
    celebrate, peace to those that won't, and everybody to take care.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Jan 10 19:30:02 2025
    Good evening,

    I have some more good news to share this week:

    Le 2024-12-20 19:15, Julien Plissonneau Duquène a écrit :
    narrowed down the issue to some subtle failure in class resolution that
    could happen either in Kotlin code or in libintellij-core-java or both

    It turned out to be some code missing in libmaven-resolver-1.6-java [1]
    which also breaks the builds of a few other packages. After solving that
    it was surprisingly easy to get Kotlin 1.3.31 to build with some
    additional code backported from 1.3.50 (no additional patching
    required), and even more surprising to see the Gradle 8.11.1 build
    succeed on the second try only after this enhanced Kotlin was installed
    and a single-line-change patch added to the Gradle packaging. A
    milestone is reached.

    Now building is one thing, getting the result to actually work is
    another battle. The first attempts could not even run successfully
    `gradle --help`, and I'm currently trying to get `gradle :help` to work
    within its own project [2], which means improving and fixing some
    earlier patching to ultimately get the generated `gradle` to be able to
    rebuild itself, and right after that make it build new releases of
    Groovy and Kotlin.

    Next week I plan to continue to progress on this, and also fork the
    `kryo` and `native-plaforms` packages to make it possible to install
    both the old and the new versions on a system, and change Gradle 4.4.1 packaging to make it use the old versions (mostly the same scheme as the current Maven upgrade).

    Cheers,


    [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091772
    [2]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/wip/README.md

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Jan 17 19:30:02 2025
    Good evening,

    This week many distractions and interruptions slowed my progress, but I
    still managed to get a few necessary things (almost) done.

    Le 2025-01-10 19:21, Julien Plissonneau Duquène a écrit :
    fork the `kryo` and `native-plaforms` packages to make it possible to
    install both the old and the new versions on a system, and change
    Gradle 4.4.1 packaging to make it use the old versions (mostly the same scheme as the current Maven upgrade).

    This is almost completed, I just need to carefully clean and rebase a
    few git branches before pushing all that to Salsa. I will then need to
    update Kotlin 1.3.31 to use the forked native-platform as well, and then
    it will be possible to patch and rebuild both projects to use the newer dependencies (including the newer maven-resolver packages for Gradle).
    It will also make it much more convenient to get back to work on Gradle
    8.11.1 on my system.

    On the side, I got my Debian Maintainer application reactivated,
    Emmanuel could post a sponsorship statement on it (thank you Emmanuel)
    and it now only lacks a PGP key endorsement which is scheduled for next
    Friday. I'm also now planning to attend the FOSDEM in Brussels to meet
    some folks from the Gradle and Kotlin (and OpenJDK and, of course,
    Debian) projects in person.

    My plans for next week are to investigate the current Gradle 8.11.1
    stage 2 build failure (which looks like either a Kotlin compiler bug or
    a dependency on a feature that is missing in 1.3.31) and try to patch
    the build script to work around that.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Jan 24 19:20:01 2025
    Good evening,

    Some great news for this week, as I got my "stage 0" gradle (the one
    that is locally built by a pre-built binary distribution of Gradle from upstream) to rebuild itself successfully.

    Le 2025-01-17 19:22, Julien Plissonneau Duquène a écrit :

    investigate the current Gradle 8.11.1 stage 2 build failure (which
    looks like either a Kotlin compiler bug or a dependency on a feature
    that is missing in 1.3.31) and try to patch the build script to work
    around that.

    It turned out that the amount of patching required was very reasonable
    given the version gap. I had to patch a few more lines for Groovy as
    well, and was delighted to achieve a successful build two days ago. It
    was also a pleasant surprise to notice that the binaries generated by
    this "stage 1" build are identical to those built by the "stage 0",
    which will make the rebootstrapping a bit easier.

    I'm currently working on packaging something that will be unfinished but
    could be pushed to experimental to make it easier for others to try the
    new release, and I have good hopes to achieve that by next week. Then
    there will still be some significant work to update or package missing
    but important dependencies, as currently some key features
    (configuration cache, HTML problem reports, TOML version catalogs, ...)
    are disabled because of this.

    Now I have a growing stack of TODO items for sponsors/uploaders willing
    to participate ;) and published the planned steps for the migrations
    here [1] (will update tomorrow).

    Have a nice week-end,


    [1]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/wip/action-plan.md

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans-Christoph Steiner@21:1/5 to All on Mon Jan 27 17:10:02 2025
    Great news! Congrats on hitting that major milestone!

    Julien Plissonneau Duquène:
    Good evening,

    Some great news for this week, as I got my "stage 0" gradle (the one that is locally built by a pre-built binary distribution of Gradle from upstream) to rebuild itself successfully.

    Le 2025-01-17 19:22, Julien Plissonneau Duquène a écrit :

    investigate the current Gradle 8.11.1 stage 2 build failure (which looks like
    either a Kotlin compiler bug or a dependency on a feature that is missing in >> 1.3.31) and try to patch the build script to work around that.

    It turned out that the amount of patching required was very reasonable given the
    version gap. I had to patch a few more lines for Groovy as well, and was delighted to achieve a successful build two days ago. It was also a pleasant surprise to notice that the binaries generated by this "stage 1" build are identical to those built by the "stage 0", which will make the rebootstrapping a
    bit easier.

    I'm currently working on packaging something that will be unfinished but could
    be pushed to experimental to make it easier for others to try the new release,
    and I have good hopes to achieve that by next week. Then there will still be some significant work to update or package missing but important dependencies,
    as currently some key features (configuration cache, HTML problem reports, TOML
    version catalogs, ...) are disabled because of this.

    Now I have a growing stack of TODO items for sponsors/uploaders willing to participate ;) and published the planned steps for the migrations here [1] (will
    update tomorrow).

    Have a nice week-end,


    [1]: https://salsa.debian.org/jpd/gradle/-/blob/upgrade-to-8.11.1-wip/debian/ wip/action-plan.md


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Mon Jan 27 19:30:01 2025
    Le 2025-01-27 17:08, Hans-Christoph Steiner a écrit :
    Great news! Congrats on hitting that major milestone!

    Thank you! But I was overoptimistic... I forgot that it was still linked
    to the Kotlin 2.0.20 bootstrap JARs and a Gradle plugin from the
    previous released version. I realized that only while working on the
    list of JARs that need to be symlinked. Switching to the same-version
    Gradle plugin was rather easy, but switching the whole remainder of the
    Kotlin stack at once to the ancient 1.3.31+1.3.50 APIs is going to be a
    whole other story if possible at all. It felt too easy last week ... and
    it was ^ ^.

    So now I'm back to build failures in early configuration stages, trying
    to figure out how to configure the whole thing so the bootstrap gradle
    (from upstream, thus unpatched) still finds the Kotlin 2.0.20 that makes
    it happy, but builds a gradle that uses our Frankenkotlin. And then try
    make that one work (or limp) enough to rebuild both itself and a Kotlin
    2+.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Jan 31 19:10:02 2025
    Good evening,

    Some slow progresses were made since Monday towards getting a Gradle
    build that doesn't depend on pre-built binaries from the upstream Gradle
    and Kotlin projects.

    Le 2025-01-27 19:25, Julien Plissonneau Duquène a écrit :

    trying to figure out how to configure the whole thing so the bootstrap
    gradle (from upstream, thus unpatched) still finds the Kotlin 2.0.20
    that makes it happy, but builds a gradle that uses our Frankenkotlin.

    I somehow found my way around this, swapping a dependency on a pre-built
    Gradle plugin from the previous version to one on the same version as
    the one being built, and downgrading the Kotlin version to that of our Frankenkotlin. I'm now deep into backporting a plugin and some APIs into
    that Kotlin, reverse-engineering some of the tedious work that was done
    by Samyak Jain and Emmanuel Bourg to convert the Kotlin build scripts to
    Groovy and downgrade them to work with a Gradle that was already quite obsolete, and trying to apply the same recipes to build scripts designed
    for significantly later versions of both Kotlin and Gradle.

    I guess that no one will be surprised if I state again that it's a slow
    and tedious process, though I think I'm progressing, and I still have
    some hopes to be able to get the thing to work with the Frankenkotlin. Considering the alternative would be to rebootstrap a Kotlin 2+ at the
    same time, which would be a significant project, I think it's worth
    investing some time into this.

    Right now I'm in a train on my way to Brussels, hoping to meet some of
    you this week-end at the FOSDEM.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Feb 7 19:50:02 2025
    Good evening,

    If anybody had doubts about the relevance of Java these days, the
    attendance of UA2.118 @ FOSDEM last Saturday should be reassuring, this
    is still a fairly popular language and environment, and still evolving
    to reduce the gap with some of the "cooler" alternatives such as Kotlin.
    I was hoping to meet some Gradle folks there, but as they were denied
    their own stand and their talks due to fierce competition they didn't
    show up (or maybe some did, but not publicly). Kotlin had their own
    stand and I could talk a bit with them, though I abstained from boasting
    about the uncanny things I'm doing with their project.

    Le 2025-01-31 19:00, Julien Plissonneau Duquène a écrit :
    it's a slow and tedious process, though I think I'm progressing, and I
    still have some hopes to be able to get the thing to work with the Frankenkotlin.

    I got a new Frankenkotlin to build with new backports by Wednesday and
    resumed the work on downgrading Gradle's Kotlin code to get it to build
    with that compiler and stdlib version. I'm already done with a few
    modules and I'm currently on the most touchy one, kotlin-dsl. This is
    still some tedious work, but not as tedious as backporting things into
    the very outdated and customized Kotlin build. This time I'm definitely
    not expecting the first stage to work on the first few tries, but I
    still think that there are reasonable chances to succeed with this
    approach, and valuable things for both projects maintenance will be
    learned in any case. I will probably be able to share the results of
    these experiments by next week.

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Feb 14 20:10:01 2025
    Good evening,

    As I'm writing this, my current gradle 8 build is down to 2 (new)
    compilation errors in kotlin-dsl (from over 60 last week).

    Le 2025-02-07 19:40, Julien Plissonneau Duquène a écrit :

    I'm already done with a few modules and I'm currently on the most
    touchy one, kotlin-dsl.

    This kept me busy for a while, as it required a fair amount of git
    archaeology to track the tormented history of some Kotlin stdlib
    features that had then to be either dropped, renamed, copy-pasted or reimplemented in Gradle source code. A few more features had to be
    backported into our Frankenkotlin, and I also had to rework the build of
    its backported assign-plugin to get jars that look like they could be
    usable.

    I will probably be done with that Gradle module soon, and I think most
    other modules written in Kotlin are already patched so I expect to be
    able to test if that gradle will rebuild itself by next week, and then
    either debug it (probable outcome) or, if I'm really lucky, resume the packaging work. Watch my repositories on salsa for updates!

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans-Christoph Steiner@21:1/5 to All on Wed Feb 19 08:00:01 2025
    Very exciting! Thanks for your status updates on this. Do you want more visibility for them? I think more people would see these if they were posted to
    a blog or Mastodon. It is easy to set up a simple Markdown/Jekyll blog on Salsa. Or you could post to this one:

    https://android-tools-team.pages.debian.net/blog/


    Julien Plissonneau Duquène:
    Good evening,

    As I'm writing this, my current gradle 8 build is down to 2 (new) compilation errors in kotlin-dsl (from over 60 last week).

    Le 2025-02-07 19:40, Julien Plissonneau Duquène a écrit :

    I'm already done with a few modules and I'm currently on the most touchy one,
    kotlin-dsl.

    This kept me busy for a while, as it required a fair amount of git archaeology
    to track the tormented history of some Kotlin stdlib features that had then to
    be either dropped, renamed, copy-pasted or reimplemented in Gradle source code.
    A few more features had to be backported into our Frankenkotlin, and I also had
    to rework the build of its backported assign-plugin to get jars that look like
    they could be usable.

    I will probably be done with that Gradle module soon, and I think most other modules written in Kotlin are already patched so I expect to be able to test if
    that gradle will rebuild itself by next week, and then either debug it (probable
    outcome) or, if I'm really lucky, resume the packaging work. Watch my repositories on salsa for updates!

    Cheers,


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Wed Feb 19 09:50:01 2025
    Hi Hans-Christoph,

    Le 2025-02-19 07:48, Hans-Christoph Steiner a écrit :
    Very exciting! Thanks for your status updates on this. Do you want
    more visibility for them?

    I think the visibility is just right at the moment, though I'm also
    thinking about opening a Mastodon account somewhere (but where?). I'm
    taking note of that android-tools-team blog and will certainly post
    there when new packages will be available for testing.

    For the record I solved the remaining build issues and I'm currently
    debugging settings.gradle.kts script compilation (that parses apparently
    fine but fails to resolve some top-level blocks).

    Cheers,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_Plissonneau_Duqu=C@21:1/5 to All on Fri Feb 21 18:20:01 2025
    Good evening,

    All hopes to get Gradle 8 to work with the FrankenKotlin are not lost
    yet.

    Le 2025-02-14 20:02, Julien Plissonneau Duquène a écrit :
    test if that gradle will rebuild itself by next week, and then either
    debug it (probable outcome)

    After finishing to fix Gradle's build the first run of the new binaries
    was a pleasant surprise as it went straight into lauching its daemon
    process (I was expecting some fight there), and that one started
    built-in configuration tasks, compilation of the packaging's init.d
    Groovy scripts, and then crashed cleanly on compiler errors after
    attempting to compile the pluginManagement block of the root settings.gradle.kts.

    It then took me several debugging sessions (debugging the bootstrap
    gradle as well to figure out the expected code path) to narrow down the
    issue to a missing step in function call resolution. In the process I
    adjusted the Kotlin compiler configuration in the Gradle DSL plugin and backported a few more minor fixes and features into Kotlin. But I had to
    give up on my last backport attempt as it appeared that it had a
    non-trivial dependency on a much larger change set: the Kotlin compiler
    plugin underwent a significant refactoring for release 1.3.50, and that includes some changes in the way the script compiler is configured.

    For the record, despite requiring Kotlin 2.0.21 the current Gradle 8
    Kotlin DSL plugin is actually using the (legacy) K1 compiler, and this
    is among the reasons why I still think there are chances to get it to
    work with the FrankenKotlin.

    I will now try to backport the whole scripting plugin from Kotlin 1.3.50
    into our FrankenKotlin and see how it goes, as this backport will bring
    its code state to something much closer to what it currently looks like
    in Kotlin 2.0.20. This is probably the last "large" Kotlin backport that
    I will attempt before declaring that approach to be a dead end.

    Have a nice week-end,

    --
    Julien Plissonneau Duquène

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)