-
Notifications
You must be signed in to change notification settings - Fork 103
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
Optionally don't expand globs in extra-source-files
#594
Comments
I think the same applies to |
@parsonsmatt this sounds bad. Did you managed to find a workaround for now? I think you could use
Yes, that would also have the advantage that you don't need to regenerate the Cabal file when more extra source files are added. Somebody will need to figure out:
|
Yeah, I managed to fix the worst impact of the performance in Cabal #10502 by skipping the glob logic if a path doesn't have any glob characters. I suspect the remaining glob code is still extremely slow, and glob expansion is going to be a pain point if we do try and push the globs into Cabal's glob syntax seems pretty limited - a I think we don't need to do anything here; evading Cabal's glob logic seems to be the winning move. |
We have ~1800 lines in our
extra-source-files
in our.cabal
file, which come from a few globs in ourpackage.yaml
. We are using a newcabal
now which can handle globs directly. However, the logic incabal
effectively treats every line inextra-source-files
as a glob, even if it doesn't have any wildcard characters. This results in an extremely slow lookup time: 34s to resolve these "globs."I see two issues:
hpack
could output a glob syntax that Cabal understands if the cabal version is new enough. This would at least reduce theI've opened an issue to track this in upstream
cabal
: cabal #10495. Apparently we're also repeating this four times, so I can probably quarter the time spent in glob lookups at least just by avoiding redundant work.The text was updated successfully, but these errors were encountered: