You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Imported from Trac #637, reported by guest on 2010-02-19)
I'm trying to keep the source of multiple packages in a single source repository. Unfortunately, I cannot maintain a .cabal file per package, because some commands invoke function defaultPackageDesc unconditionally.
I tried using defaultMainNoRead instead of defaultMain
and passing the desired package name through the environment. This solution doesn't work at all in 1.6.0.3. It works only partially in HEAD: Setup configure and Setup build work but Setup sdist does not because it ignores the readDesc field and invokes defaultPackageDesc unconditionally.
Would it be possible to add a field to UserHooks which would specify the .cabal filename to use? Then defaultPackageDesc should be always called through this field, never directly, and could thus be consistently overridden.
The text was updated successfully, but these errors were encountered:
Chiming in here to add my support for this request. I recently got bit by the fact that sdist ignores readDesc, which is unfortunate, as it seems like the cleanest approach to programmatically populating fields like extra-source-files.
This also bit me recently. I was also programmatically populating extra-source-files.
Any command ignoring the readDesc hook is out of line. Note that sdist now does the expected thing ( #3491 ) , though there are other issues such as #3552 to be ironed out.
Long run I would expect our use case to disappear in favour of globstar #3178 , so this issue will be doubly dealt with. I am unsure of the original author's use case, however, so I am hesitant to close this issue.
It seems to me that I'm trying to keep the source of multiple packages in a single source repository. is just what v2 build and cabal.project gives us. Otoh we are trying to reduce the use of custom setups .
The extra-source-filesuse case is also covered as noted above so i am gonna close this.
Feel free to reopen if this is still needed for an use case not took in account
(Imported from Trac #637, reported by guest on 2010-02-19)
I'm trying to keep the source of multiple packages in a single source repository. Unfortunately, I cannot maintain a .cabal file per package, because some commands invoke function defaultPackageDesc unconditionally.
I tried using defaultMainNoRead instead of defaultMain
and passing the desired package name through the environment. This solution doesn't work at all in 1.6.0.3. It works only partially in HEAD: Setup configure and Setup build work but Setup sdist does not because it ignores the readDesc field and invokes defaultPackageDesc unconditionally.
Would it be possible to add a field to UserHooks which would specify the .cabal filename to use? Then defaultPackageDesc should be always called through this field, never directly, and could thus be consistently overridden.
The text was updated successfully, but these errors were encountered: