pubref / rules_kotlin

Bazel rules for Kotlin
Other
159 stars 20 forks source link

Failing with bazel 0.6 #34

Closed laurentlb closed 7 years ago

laurentlb commented 7 years ago

When using the Kotlin rules with Bazel 0.6, I get this error:

ERROR: /tmp/bzl/BUILD:6:1: in kotlin_compile rule //:Hello_kt: 
Traceback (most recent call last):
    File "/tmp/bzl/BUILD", line 6
        kotlin_compile(name = 'Hello_kt')
    File "/usr/local/google/home/laurentlb/.cache/bazel/_bazel_laurentlb/1cf9e271f53a4fcee3da31675bf7c3a0/external/org_pubref_rules_kotlin/kotlin/rules.bzl", line 89, in _kotlin_compile_impl
        struct(files = set([kt_jar]), runfiles = ...), ...)))
    File "/usr/local/google/home/laurentlb/.cache/bazel/_bazel_laurentlb/1cf9e271f53a4fcee3da31675bf7c3a0/external/org_pubref_rules_kotlin/kotlin/rules.bzl", line 90, in struct
        set([kt_jar])
The `set` constructor for depsets is deprecated and will be removed. Please use the `depset` constructor instead. You can temporarily enable the deprecated `set` constructor by passing the flag --incompatible_disallow_set_constructor=false

Workaround is simple (specify --incompatible_disallow_set_constructor=false), but it would be nice to update the code. Ideally, it would build even with --all_incompatible_changes. See https://docs.bazel.build/versions/master/skylark/backward-compatibility.html for background.

Let me know if you need help.

pcj commented 7 years ago

Thanks, will fix.

dlazerka commented 7 years ago

Is there any plans of releasing a version with this fix? It's just prevents IntelliJ from building project at all, as there seem to be no way to tell IntelliJ to use the workaround param --incompatible_disallow_set_constructor=false.

dlazerka commented 7 years ago

Workarounded by temporary specifying exact commit in git_repository() bazel rule.

pcj commented 7 years ago

@dlazerka 0.4.1 released.