Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: 'configure' command generates Kotlin rules #474

Closed
3 tasks done
alexeagle opened this issue Jun 12, 2023 · 5 comments
Closed
3 tasks done

[FR]: 'configure' command generates Kotlin rules #474

alexeagle opened this issue Jun 12, 2023 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@alexeagle
Copy link
Member

alexeagle commented Jun 12, 2023

What is the current behavior?

Users have to write BUILD files by hand containing kt_jvm_library and other Kotlin rules

Describe the feature

@alexeagle alexeagle added the enhancement New feature or request label Jun 12, 2023
@github-actions github-actions bot added the untriaged Requires traige label Jun 12, 2023
@jbedard jbedard removed the untriaged Requires traige label Jun 12, 2023
@kolloch
Copy link

kolloch commented Aug 3, 2023

Thanks for starting this!

Note that I get parse errors for relatively basic Kotlin files when using aspect configure:

xxx/ch/nexiot/gh/commander/api/commands/FirmwareVersion.kt parse error(s):
     8: 	val versionString get() = "$major.$minor.$patch"

Context:

package ch.nexiot.gh.commander.api.commands

class FirmwareVersion(
        val major: Int,
        val minor: Int,
        val patch: Int,
) {
        val versionString get() = "$major.$minor.$patch"
}

.bazeliskrc

BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download
USE_BAZEL_VERSION=aspect/5.5.4

.bazelversion 6.3.0

.aspect/cli/config.yaml

configure:
  languages:
    javascript: false
    go: false
    kotlin: true
    protobuf: true

@alexeagle
Copy link
Member Author

@kolloch despite that scary "parse error", we've seen that the BUILD files are actually updated in the desired way. Did aspect configure make BUILD file edits in your case?

@kolloch
Copy link

kolloch commented Aug 11, 2023

Did aspect configure make BUILD file edits in your case?

Possible, I don't remember. I should try again.

I think you do not resolve dependencies yet?

My dabbling with this was mostly whether it makes sense to integrate my work with that. I solid parser does not make a big difference, since it will still not allow this solution to be perfect in detecting dependencies. But for now, it doesn't seem solid. Maybe that's easy to change! That would be awesome.

For now, it would be easier for me to continue with a solution that I understand.

@jbedard
Copy link
Member

jbedard commented Aug 12, 2023

FYI @kolloch #501 has the feature adding maven support, basically just supporting the existing rules_jvm gazelle maven config within kotlin. Once that PR is merged let me know if you get a chance to check it out.

@alexeagle
Copy link
Member Author

The MVP for this is done, we can open more issues for more changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants