Skip to content

Add a script to extract base from GHC’s Git history#9

Open
Superstar64 wants to merge 2 commits intowell-typed:mainfrom
Superstar64:history_preserving_splitting
Open

Add a script to extract base from GHC’s Git history#9
Superstar64 wants to merge 2 commits intowell-typed:mainfrom
Superstar64:history_preserving_splitting

Conversation

@Superstar64
Copy link

This is a script that extracts base from ghc's git while keeping the history intact. It also makes the resulting repo a direct fork of the git repo that predates the merger of base into ghc: https://github.com/ghc/packages-base

@jeltsch
Copy link
Collaborator

jeltsch commented Jan 16, 2026

Thanks for your submission.

I haven’t worked with things like git filter-repo for a long time, but to me your script looks quite complex. I wonder whether a one- or two-liner would suffice. What is the benefit of involving the packages-base repository, for example?

In any case, it seems that we’re still quite a bit away from moving base into its own repository. It seems to be a widely shared opinion that we should first make base independent of particular GHC versions and only then perform the repository split.

@Superstar64
Copy link
Author

Superstar64 commented Jan 16, 2026

I wonder whether a one- or two-liner would suffice. What is the benefit of involving the packages-base repository, for example?

Well sure, the one liner version would just be to clone GHC and run git filter-repo --subdirectory-filter libraries/base. I choose to ground it in packages-base because running said command would contain a slightly different history of packages-base (along everything since the divergence) and I figure it's better fork from an existing history then having completely syntactic history. If this motivation isn't convincing enough, then feel free to reject this PR.

In any case, it seems that we’re still quite a bit away from moving base into its own repository.

I know. I figure it's better to have this ready now and be able to discuss it rather then waiting for later.

@jeltsch
Copy link
Collaborator

jeltsch commented Jan 17, 2026

If this motivation isn't convincing enough, then feel free to reject this PR.

I’d have to look a bit more deeply into this to form a definite opinion. I think that it’s best to leave this pull request open for now and review the topic later.

@jeltsch jeltsch changed the title Add script to extract base from ghc's git history Add a script to extract base from GHC’s Git history Feb 5, 2026
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.

2 participants

Comments