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

Candidate for migration #13

Closed

Conversation

savetheclocktower
Copy link

This branch starts with the SHA that matches what's in NPM, then adds all commits related to

  • CI (because the migration to GitHub actions is important), or
  • moving win-iconv into the vendor directory instead of a submodule (so yarn will do the right thing when installing from GitHub).

savetheclocktower and others added 14 commits July 3, 2024 14:39
We're about to commit it as regular files,
so we first we need to get rid of the submodule.
This replaces what used to be a *submodule* of the win-iconv repo.

Using git subtree preserves revision history,
author info (including blame view), and so on.

win-iconv is a very small repo, it's public domain,
and it has few revisions. So, I think it's worth it to do all that,
for giving proper attribution of author info, if for no other reason.

Not using a submodule is more compatible with newer npm (npm 7.x+),
and apparently with Yarn (v1.x?) as well. It's overall less complicated
for end users of the superstring package/repo.

---

Add 'vendor/win-iconv/' from commit '9f98392dfecadffd62572e73e9aba878e03496c4'

git-subtree-dir: vendor/win-iconv
git-subtree-mainline: 5b2f39d
git-subtree-split: 9f98392
Node 14 is pretty old by now.

Node 14 latest was Node v14.21.3, which came with npm v6.14.8,
which came with node-gyp v5.1.1.

node-gyp v5.1.1 doesn't support Visual Studio 2022, which is the most
recent version and is included in the windows-latest GitHub-hosted
runner for GitHub Actions.

Using the windows-2019 GitHub-hosted runner for Node 14 on Windows
should work, since old node-gyp v5.1.1 should work with Visual Studio
2019... Hopefully.
I don't know anything about C or C++,
other than this fixes the compilation error
on g++ 13.

Tested in an Ubuntu 23.10 Docker container.
The quotation marks seem to be intepreted literally, breaking caching,
since a dir named (literally, with quotes in the name) 'node_modules'
doesn't exist? (Either that, or the cache actions or its glob dependency
are just super broken.)
This ensures compatibility with most versions of node-gyp.
There is a fix for Python 3.12 compatibility in node-gyp 10,
but older versions of npm come with older node-gyp, so here we are.
For compatibility with old node-gyp, which is shipped with old npm,
which is shipped with Node 14.

Very old node-gyp isn't compatible with Python 3.11+.
Install Python 3.10 instead.
* Remove scripts we don't need.
* Report progress better on fetching/compiling `libiconv`.
* Preserve the license and README from `libiconv`.
@savetheclocktower
Copy link
Author

savetheclocktower commented Jul 6, 2024

Closing in favor of #15.

@savetheclocktower savetheclocktower deleted the candidate branch July 6, 2024 01:39
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