Skip to content
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

Untangle the macaw-loader submodule knot #283

Open
RyanGlScott opened this issue Apr 29, 2022 · 3 comments
Open

Untangle the macaw-loader submodule knot #283

RyanGlScott opened this issue Apr 29, 2022 · 3 comments
Labels
tech-debt Technical debt that would be nice to clean up

Comments

@RyanGlScott
Copy link
Contributor

Currently the macaw repo depends on the macaw-loader repo as a submodule dependency. However, the macaw-loader repo also depends on the macaw repo as a submodule. This makes coordinating submodule bumps between the repos challenging, as they sometimes have to be updated simultaneously.

I'd like to propose that we find a way to make this situation more tolerable. Some possible ideas for doing so:

  1. Cut the submodule dependency knot by removing macaw's dependency on macaw-loader, thereby removing the macaw-loader submodule dependency from macaw. This would require changing some code in macaw to avoid the use of macaw-loader, however. In some cases, this would impact the public-facing API, such as in macaw-ppc and macaw-refinement.
  2. Bring the macaw-loader packages into the macaw repo. This would involve some amount of churn for downstream libraries, but it could be done.
  3. Something else?
@RyanGlScott RyanGlScott added the tech-debt Technical debt that would be nice to clean up label Apr 29, 2022
@travitch
Copy link
Contributor

I'm happy to merge it in. Id like to think about the API a bit, but maybe we can just mark it unstable and refine it over time

@kquick
Copy link
Member

kquick commented Apr 18, 2023

I also like option 2: merging in macaw-loader. IIRC, it wasn't originally a circular dependency until we merged some of the other macaw repos together.

danmatichuk added a commit to GaloisInc/pate that referenced this issue Dec 12, 2023
Before GHC 9.4 the cabal build cache did not work properly with
submodules. This was worked around by automatically converting submodules into
source repository packages in cabal.project. This has two issues:
  * source repo checkouts are implicitly recursive, creating a lot of
    duplicate checkouts of all sub-repos
  * macaw and macaw-loader are mutually dependent, causing a recursive
    checkout of either to get stuck in a loop.
    see: GaloisInc/macaw#283

Since we have no explicit reason to support older GHC revisions, we can
just drop it from CI for simplicity
@RyanGlScott
Copy link
Contributor Author

Another unfortunate consequence of doing this is that git submodule update --init --recursive will go into an infinite loop, as reported in GaloisInc/saw-script#2065.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Technical debt that would be nice to clean up
Projects
None yet
Development

No branches or pull requests

3 participants