Giter Club home page Giter Club logo

Comments (9)

borkaehw avatar borkaehw commented on June 11, 2024

You might be right. I don't think we take --define into account when we do deps check. Do you think it's a nice to have feature in the .bazelrc file? Or configuring it in configure_zinc_scala is good enough?

from rules_scala.

jjudd avatar jjudd commented on June 11, 2024

Maybe I'm wrong, but isn't --define how the deps check feature works? Like you do --define=scala_deps_used=warn or --define=scala_deps_used=error?

from rules_scala.

joprice avatar joprice commented on June 11, 2024

I don’t know enough to know whether it’s broken or I’m using it wrong. For now having it in configure_zinc_scala works since I configure it statically, but it being able to be dynamic without having to define a custom config setting would be convenient for different strictness levels when refactoring or in CI envs.

from rules_scala.

borkaehw avatar borkaehw commented on June 11, 2024

@jjudd I can't see where we use --define anywhere. As far as I understand, --define is used to configure attributes in BUILD, see reference here. The most straightforward way is to pass in error, check, or off via attributes in configure_zinc_scala.

@joprice I will try if I can come up with something handy like that. Before that, I would check out select to see if it fits your need.

from rules_scala.

joprice avatar joprice commented on June 11, 2024

@borkaehw I was mostly concerned about the docs mentioning this facility, but it not being possible. It took me a while to find that it was available on configure_zinc_scala and wanted to save other people time. I don't currently need the feature to configure it via a define, just anyway to set it.

from rules_scala.

borkaehw avatar borkaehw commented on June 11, 2024

@joprice Sorry for the inconvenience. I talked to the other maintainers, it used to work. We will either remove it from doc or actually fix it. Please keep this issue open as a reminder. I will keep you posted.

from rules_scala.

joprice avatar joprice commented on June 11, 2024

I just hit this again and had to copy the default 2.12 toolchain into my project to override deps_used. At that point, it would be more convenient to just have a flag, since now I have to maintain a bit more just for that one flag, and it wasn't obvious that I was supposed to do that. On the other hand, maybe it could also be solved by allowing passing in extra config to scala_register_toolchains or something along those lines.

from rules_scala.

joprice avatar joprice commented on June 11, 2024

@borkaehw I tried the changes and get a duplicate key error when trying to configure them via the zinc toolchain macro. Using define works now, but I expected to be able to set it to "warn" as well as off. Only "off" seems to work.

from rules_scala.

borkaehw avatar borkaehw commented on June 11, 2024

Help me understand it correctly. There are still two issues

  1. Using --define in .bazelrc and Zinc toolchain macro causes duplicate key?
  2. --define doesn't support warn, but Zinc toolchain does?

from rules_scala.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.