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

CPP macro are only generated when 'version' attribute is specified. #446

Merged
merged 2 commits into from
Oct 1, 2018

Conversation

guibou
Copy link
Contributor

@guibou guibou commented Sep 25, 2018

This fix #414.

In #414, we observed that CPP version macro generated by GHC can leads to conflict if two bazel targets have the same name, hence the same GHC package name. For example //foo:bar and //frob:bar will have package name bar and will generated VERSION_bar macros.

This PR deactivate macro generation if rule does not have a version attribute. see #414 for discussion.

@guibou guibou force-pushed the guibou/version-macro branch 2 times, most recently from ac1c814 to 6bbb1d0 Compare September 25, 2018 14:54
@guibou guibou requested review from mboes and mrkkrp and removed request for mboes September 25, 2018 14:54
"-fno-version-macros",
])

# Expose all prebuilt dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should not be indented, that's buildifier fault ;(

@guibou
Copy link
Contributor Author

guibou commented Sep 25, 2018

#445 was merged, and this PR works perfectly on a client huge codebase.

@guibou guibou force-pushed the guibou/version-macro branch 3 times, most recently from 9476a53 to 9e6488c Compare September 26, 2018 12:20
@guibou
Copy link
Contributor Author

guibou commented Oct 1, 2018

@mrkkrp @Profpatsch @mboes ping?

@Profpatsch
Copy link
Contributor

I can’t say anything about the validity of the change per se, but the code cooks sensible.
Some function calls are getting very long, I suggest we split them to multi-line.

@regnat does this interferes with your changes in #442?

Copy link
Member

@mrkkrp mrkkrp left a comment

Choose a reason for hiding this comment

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

LGTM

@guibou guibou merged commit 936aa63 into master Oct 1, 2018
@guibou guibou deleted the guibou/version-macro branch October 1, 2018 15:05
guibou added a commit that referenced this pull request Oct 3, 2018
This reverts commit 936aa63, reversing
changes made to d8c7ae2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CC Macro name conflict when two packages have the same name
3 participants