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

Cabal should ifndef CURRENT_PACKAGE_KEY macro definitions #3041

Closed
ezyang opened this Issue Jan 14, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@ezyang
Copy link
Contributor

ezyang commented Jan 14, 2016

@mgsloan reports that Stack has to manually undef CURRENT_PACKAGE_KEY in order to avoid a slew of redefinition errors. We should ifndef these macro definitinos.

@mgsloan

This comment has been minimized.

Copy link
Collaborator

mgsloan commented Jan 14, 2016

Note that this is in the case where we're loading up ghci with multiple packages, and so multiple cabal_macros.h

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Feb 22, 2016

Won't this break packages that actually use CURRENT_PACKAGE_KEY?

@ezyang

This comment has been minimized.

Copy link
Contributor

ezyang commented Feb 22, 2016

Yes, but as long as GHCi doesn't know how to manage multiple sets of preprocessor flags when loading in files, there is nothing you can do.

ezyang added a commit to ezyang/cabal that referenced this issue Aug 15, 2016

Fix haskell#3041, ifndef all CURRENT_PACKAGE_KEY and related macros.
I also realized LOCAL_COMPONENT_ID is pessimal if we don't
depend on a library, so I removed it. (It has never been
in a real Cabal release.)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

ezyang added a commit to ezyang/cabal that referenced this issue Aug 16, 2016

Fix haskell#3041, ifndef all CURRENT_PACKAGE_KEY and related macros.
I also realized LOCAL_COMPONENT_ID is pessimal if we don't
depend on a library, so I removed it. (It has never been
in a real Cabal release.)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

ezyang added a commit to ezyang/cabal that referenced this issue Aug 16, 2016

Fix haskell#3041, ifndef all CURRENT_PACKAGE_KEY and related macros.
I also realized LOCAL_COMPONENT_ID is pessimal if we don't
depend on a library, so I removed it. (It has never been
in a real Cabal release.)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

ezyang added a commit to ezyang/cabal that referenced this issue Aug 20, 2016

Fix haskell#3041, ifndef all CURRENT_PACKAGE_KEY and related macros.
I also realized LOCAL_COMPONENT_ID is pessimal if we don't
depend on a library, so I removed it. (It has never been
in a real Cabal release.)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

@ezyang ezyang closed this in e7ab46a Aug 21, 2016

ezyang added a commit that referenced this issue Aug 21, 2016

Merge pull request #3695 from ezyang/pr/ifndef-current-pkg-key
Fix #3041, ifndef all CURRENT_PACKAGE_KEY and related macros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment