Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Fix scala_deps_direct and scala_deps_used #258

Merged
merged 5 commits into from
Dec 18, 2019

Conversation

borkaehw
Copy link
Collaborator

Fix: #249

@@ -67,91 +67,6 @@ configure_bootstrap_scala(<a href="#configure_bootstrap_scala-name">name</a>, <a
</table>


<a name="#configure_zinc_scala"></a>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The downside is the stardoc has less info.

@@ -535,3 +535,16 @@ configure_zinc_scala = rule(
},
implementation = _configure_zinc_scala_implementation,
)

def configure_zinc_scala(**kwargs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reasoning behind wrapping the original configue_zinc_scala? couldn't we just use these selects on the original attributes instead? That way we don't lose the documentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, select only applies in BUILD or macro. select needs to be resolved before passing to a rule.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it seems you're right..
(bazelbuild/bazel#287 (comment))

That's unfortunate though cause it means we'll lose the signature docs.. an option is to explicitly propagate each argument instead of using **kwargs, but we'd still lose the argument types/descriptions so I'm not sure that'd be much better

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, those explicitly listed attributes will only be shown optional.

James said it used to work, but I really doubt it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to add a separate doc page for configure_zinc_scala and to link to it from the README. You could simply copy the old md and put it in its own file (and perhaps include a comment on how you can use deps_used_off and deps_direct_off to disable things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document has been added.

<tr id="configure_zinc_scala-deps_direct">
<td><code>deps_direct</code></td>
<td>
String; optional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the options here too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

<tr id="configure_zinc_scala-deps_used">
<td><code>deps_used</code></td>
<td>
String; optional
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@SrodriguezO
Copy link
Collaborator

Looks great! I'll approve once builds pass

@borkaehw
Copy link
Collaborator Author

It has passed.

@borkaehw borkaehw merged commit b2db774 into higherkindness:master Dec 18, 2019
@borkaehw borkaehw deleted the fix-deps-define branch December 18, 2019 20:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot configure scala_deps_used via --define
2 participants