Skip to content

root relative glob expansion of extra source files #8640

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

Merged
merged 2 commits into from
Jan 2, 2023

Conversation

gbaz
Copy link
Collaborator

@gbaz gbaz commented Dec 24, 2022

Resolves #8632
Resolves #8634

This was indeed a bug in #7608

The confusion is that the cabal in the 3.6 series tested against did not contain a backport of that patch.

The issue is that extra-source-file glob expansion was written to expand relative to "." rather than the relative root of the package in question. So this worked in single-package setups, but not when in the base directory of a project with multiple packages.

Along the way, this bumps the verbosity of glob expansion.

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Looks plausible! I wonder if we need to audit other uses of this function. For example, it looks like in Install.hs there is some matching of data files that falls back to resolving from . if the data dir isn't set. Or perhaps rather the thing that's questionable there (and generally in a multi-package world) is the use of . 🤔

@gbaz gbaz merged commit 7babda9 into master Jan 2, 2023
@jneira
Copy link
Member

jneira commented Jan 2, 2023

no regression tests lately 😟
that will bit sooner o later

@andreasabel andreasabel deleted the gb/cabal-expansion-root-relative branch February 23, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning if a file glob doesn't match anything Cabal 3.8 does not appear to track extra-source-file rebuilds correctly
4 participants