Skip to content

Add maiko, notecards, loops, test as git submodules#2532

Draft
masinter wants to merge 3 commits intomasterfrom
lmm30-use-submodules
Draft

Add maiko, notecards, loops, test as git submodules#2532
masinter wants to merge 3 commits intomasterfrom
lmm30-use-submodules

Conversation

@masinter
Copy link
Copy Markdown
Member

@masinter masinter commented Mar 9, 2026

Summary

  • Adds maiko, notecards, loops, and test as git submodules, each pinned to the current HEAD of their default branch (master for maiko/test, main for notecards/loops)
  • Removes maiko/ from .gitignore so it can be tracked as a submodule
  • Submodule paths match what the existing build scripts already expect ($MEDLEYDIR/maiko, $MEDLEYDIR/notecards, etc.), so no script changes are needed

After merging

Contributors cloning fresh will need:

git submodule update --init --recursive

To advance submodules to latest upstream:

git submodule update --remote

🤖 Generated with Claude Code

masinter and others added 3 commits March 8, 2026 13:25
Removes maiko/ from .gitignore so it can be tracked as a submodule.
Each submodule is pinned to the current HEAD of its default branch
(master for maiko/test, main for notecards/loops).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds Interlisp/online pinned to current HEAD of main, consistent
with the other submodules added in this branch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
doHCFILES.yml: replace 5 separate checkout steps with a single
  checkout using submodules:true; remove now-redundant .git cleanup step.

buildLoadup.yml: add submodules:true to Checkout Medley; remove
  separate Checkout Notecards + tar steps (notecards.tgz was already
  commented out of the release push).

make-gh-pages.md: replace manual clone+copy instructions with
  git clone --recurse-submodules; remove rm -rf of submodule dirs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@masinter
Copy link
Copy Markdown
Member Author

masinter commented Mar 9, 2026

How the loadup process changes

Basic loadup (lisp.sysout, full.sysout): nothing changes. These only need the maiko binaries (lde, ldeinit) on PATH or at ../maiko/ — the source submodule does not provide compiled binaries.

apps.sysout (requires notecards): previously you needed notecards cloned at ../notecards. Now it is automatically at $MEDLEYDIR/notecards after git submodule update --init. The loadup-apps-from-full.sh script already checked that path first, so this just makes it automatic.

HCFILES (requires loops and test too): previously you had to manually clone those repos and copy them in. Now they are already there.

What you need to do differently after cloning medley

# Before:
git clone https://github.com/Interlisp/medley
git clone https://github.com/Interlisp/notecards ../notecards  # if building apps
# ... etc

# After:
git clone --recurse-submodules https://github.com/Interlisp/medley
# or on existing clone:
git submodule update --init --recursive

What has not changed

  • You still need maiko binaries built or downloaded separately — the maiko submodule is source only
  • The actual loadup commands (./scripts/loadup-all.sh, etc.) are unchanged
  • The fallback to ../maiko, ../notecards etc. still works if you prefer sibling directories

@nbriggs
Copy link
Copy Markdown
Contributor

nbriggs commented Mar 9, 2026

Tried twice to clone medley freshly -- both times it failed with:

 % git clone  --recurse-submodules https://github.com/Interlisp/medley medley-submods
Cloning into 'medley-submods'...
remote: Enumerating objects: 24488, done.
remote: Counting objects: 100% (369/369), done.
remote: Compressing objects: 100% (217/217), done.
error: RPC failed; curl 92 HTTP/2 stream 5 was not closed cleanly: CANCEL (err 8)
error: 6783 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

@masinter
Copy link
Copy Markdown
Member Author

masinter commented Mar 9, 2026

I'm a little baffled: I can no longer find a place where it was recommended using

 git clone  --recurse-submodules https://github.com/Interlisp/medley medley-submods

as those instructions are wrong. The correct instructions are here in the PR
and in the email. https://groups.google.com/g/lispcore/c/jaOhaJJn-s4

After merging

Contributors cloning fresh will need:

git submodule update --init --recursive

To advance submodules to latest upstream:

git submodule update --remote

@nbriggs
Copy link
Copy Markdown
Contributor

nbriggs commented Mar 9, 2026

I think that if the goal is to have reproducible builds, and to have known compatible maiko and medley code, then the loadup should use the lde/ldex/ldeinit as built in the maiko submodule -- otherwise you're building with something (from outside) that may or may not be related to the vetted lde/ldeinit/ldex source in the submodule.

@rmkaplan
Copy link
Copy Markdown
Contributor

rmkaplan commented Mar 9, 2026

Does GITFNS have to change? It has some code for finding various clones along ancestor paths.

@pamoroso
Copy link
Copy Markdown
Member

pamoroso commented Mar 9, 2026

I freshly cloned the medley repo with git clone --recurse-submodules at ~/smedley/medley/ but under that tree I don't see the maiko subdirectory (and neither notecards, loops, and test) which I need to build Maiko. But probably I'm misunderstanding how submodules are supposed to work.

@nbriggs
Copy link
Copy Markdown
Contributor

nbriggs commented Mar 9, 2026

@pamoroso - since the PR hasn't been merged yet, the main branch that you're on doesn't yet have submodules, so you'll need to switch to the PR branch lmm30-use-submodules before doing git submodule init (from in the medley directory you cloned).

@pamoroso
Copy link
Copy Markdown
Member

pamoroso commented Mar 9, 2026

I did what you suggested and it worked.

@pamoroso
Copy link
Copy Markdown
Member

pamoroso commented Mar 9, 2026

However, now maiko and the other submodule directories are empty.

@nbriggs
Copy link
Copy Markdown
Contributor

nbriggs commented Mar 9, 2026

@pamoroso git submodule update

@pamoroso
Copy link
Copy Markdown
Member

pamoroso commented Mar 9, 2026

Never mind, updating with git submodule update --remote did the trick.

@pamoroso
Copy link
Copy Markdown
Member

I successfully made the apps loadup from the submodules on Linux Mint 22.1 Cinnamon.

@masinter
Copy link
Copy Markdown
Member Author

Does GITFNS have to change? It has some code for finding various clones along ancestor paths.

  • GITFNS should look in the submodules subdirectories (medley/loops, medley/test etc) before looking for the repos for those in sister/aunt relations. It might already be set up that way? If you have aa/medley/notecards (subdirecdtory) and aa/medley aa/notecards (sister), which one does it find first? It SHOULD pick up from subdirectories first.

I have some changes to the .gitignore for each submodule repository. I've proposed PRs for each of notecards, test, loops, maiko. I think those PRs will need to be merged BEFORE merging this one (sigh).

@masinter masinter marked this pull request as draft March 30, 2026 18:16
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.

4 participants