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

Fix thrift bazel incompatibilities #456

Merged
merged 1 commit into from
Mar 26, 2018
Merged

Conversation

johnynek
Copy link
Member

This is the thrift part of #452 to address #430

Copy link
Member

@ittaiz ittaiz left a comment

Choose a reason for hiding this comment

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

looks good in general.
to be honest I somewhat skimmed it since it looks very similar to the other PRs and has a lot of small changes.
I did ask one question inside though

@@ -130,16 +139,16 @@ def _gen_scrooge_srcjar_impl(ctx):
# These are the thrift sources in the dependency graph. They are necessary
# to generate the code, but are not "owned" by this target and will not
# be in the resultant source jar
transitive_thrift_srcs = transitive_owned_srcs + _collect_transitive_srcs(ctx.attr.deps)
transitive_thrift_srcs = depset(transitive = [transitive_owned_srcs, _collect_transitive_srcs(ctx.attr.deps)]).to_list()
Copy link
Member

Choose a reason for hiding this comment

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

does this (depset and then to_list) make sense?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to walk the depset eventually, but we do need it as a list. So, I don't know another way.

Note this is semantically a union of two depsets, but union is deprecated now...

I really don't know why they deprecated union when you can implement with depset(transitive = [a, b])... They should be optimizing depset to handle that case...

I'm concerned the bazel folks have not looked at the FP literature on fast immutable types, but maybe they have. I fear they may just be doing immutability with copying.

@ittaiz ittaiz merged commit a8d6058 into master Mar 26, 2018
@ittaiz ittaiz deleted the oscar/fix_thrift_incompatibilies branch July 1, 2018 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants