[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Update for kotlin package




Samyak Jain:
> Hi again :D
> 
> 
> The issue for the modified binaries was fixed last week and the package
> built successfully, without any failures. The updated package can be found
> here[1]
> 
> On Wed, May 27, 2020 at 4:18 AM Emmanuel Bourg <ebourg@apache.org> wrote:
> 
>> Thank you very much for working on Kotlin, that's definitely not a small
>> feat.
>>
>> The key issue before uploading is to check if it's possible to build
>> Kotlin without the bootstrap package, i.e. the kotlin package can
>> rebuild itself. The process is to first build the kotlin package with
>> the bootstrap binaries, then install the package built, remove the
>> bootstrap package, adjust the build dependencies and rebuild kotlin.
>> This rebuilt package is the one you want to upload.
>>
> 
> After that to check if kotlin can build from itself, I tried testing as per
> the workaround specified by ebourg in the last mail.
> Created a clean lxc container and installed the kotlin .deb file. Checked
> if the kotlinc compiler was working or not? Yes, the basic functionalities
> work fine.
> But, here is the case: I tried building the kotlin package again(to check
> is rebuilding is possible without bootstrap), by removing some of the
> dependencies from the bootstrap package, but it failed with the following
> errors.
> 
> ```
> FAILURE: Build failed with an exception.
> 
> * What went wrong:
> A problem occurred configuring project ':buildSrc'.
>> Could not resolve all files for configuration ':buildSrc:classpath'.
>    > Could not resolve
> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30-eap-28.
>      Required by:
>          project :
>       > No cached version of
> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30-eap-28 available for
> offline mode.
>       > No cached version of
> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30-eap-28 available for
> offline mode.
>       > No cached version of
> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.30-eap-28 available for
> offline mode.
>    > Could not resolve
> org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.30-eap-28.
>      Required by:
>          project :
>       > No cached version of
> org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.30-eap-28 available for
> offline mode.
>       > No cached version of
> org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.30-eap-28 available for
> offline mode.
>       > No cached version of
> org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.30-eap-28 available for
> offline mode.
> 
> ```
> It fails to find kotlin-Gradle-plugin in offline mode. And FWIW, we need to
> package kotlinx libraries and package them, but here is the thing the
> kotlinx has .kt files which need kotlin compiler itself to build them.
> It looks like a cyclic dependency to me, because if we don't have kotlinx
> the compiler won't function. Please correct me, if I'm mistaken.
> 
> Is there any other workaround/suggestion if possible? For now, I'm trying
> to investigate if I can package kotlinx packages somehow.

Debian builds will always be in "offline mode" since the Debian builds
require that all dependencies are installed locally.  By default, gradle
will try to download dependencies from the configured maven
repositories.  So this error means that those libraries not installed
locally.

Probably the best way to handle the circular dependency is to patch out
the kotlinx dependencies entirely for the bootstrap phase.  Once a basic
kotlin is in Debian, then the kotlinx stuff can be packaged and
uploaded.  Once kotlinx is in Debian, then the patch can be removed from
kotlin, and that part of kotlin can be built and packaged.

.hc


Reply to: