Skip to content

Conversation

@jkmassel
Copy link
Contributor

@jkmassel jkmassel commented Dec 9, 2025

Just the tests for #250, split out because there's a lot of code.

@jkmassel jkmassel requested review from dcalhoun and kean December 9, 2025 06:27
@jkmassel jkmassel changed the base branch from trunk to add/preload-list December 9, 2025 06:27
@jkmassel jkmassel force-pushed the add/preload-list-tests branch 3 times, most recently from 8876355 to bee4474 Compare December 9, 2025 22:16
@jkmassel jkmassel force-pushed the add/preload-list-tests branch 2 times, most recently from b466e2a to 99ce8f9 Compare December 9, 2025 23:50
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

Thank you for the thorough test coverage!

I skimmed the test names, and a few dozen test implementations. The tests look good to me.

Some of the more granular tests seem less valuable (e.g., Foundation extensions). Hopefully their long-term value exceeds any maintenance cost—presumably we won't change these much and generative AI should make changes easier. I'm not opposed to keeping them, but we could consider reduction or consolidation if deemed worthwhile.

@jkmassel jkmassel force-pushed the add/preload-list-tests branch 2 times, most recently from 543e9e1 to 64284af Compare December 13, 2025 03:00
Base automatically changed from add/preload-list to trunk December 16, 2025 16:13
@jkmassel jkmassel enabled auto-merge (squash) December 16, 2025 16:13
@jkmassel jkmassel requested a review from dcalhoun December 17, 2025 19:08
@dcalhoun dcalhoun force-pushed the add/preload-list-tests branch from 209696f to f59acb1 Compare December 17, 2025 19:26
@dcalhoun
Copy link
Member

I rebased atop the latest trunk branch with the following command to make review easier:

git rebase --onto origin/trunk origin/add/preload-list add/preload-list-tests

@dcalhoun dcalhoun disabled auto-merge December 17, 2025 19:47

# Build Swift package (force refresh of npm deps/translations if needed)
make build-swift-package REFRESH_DEPS=1 REFRESH_L10N=1
swift build
Copy link
Member

Choose a reason for hiding this comment

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

Is the usage of swift over make to avoid required simulators or some other purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The make stuff is used in CI, which builds the JS. Claude kept running it unnecessarily which was slow, and also polluted my git repo with the JS changes

Copy link
Member

Choose a reason for hiding this comment

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

@jkmassel makes sense.

I've been addressing similar inefficiencies elsewhere by introducing REFRESH_[target] environment variables for the npm-dependencies and prep-translations targets. We might consider adding a similar REFRESH_JS_BUILD here.

My goal has been to structure the Makefile to be the de facto interface for the project, where all documentation for users and LLMs point to the same scripts. Where the Makefile...

  1. Always ensures the correct dependencies are in place for a given target;
  2. Delivers efficient re-runs (for local runs);
  3. And provides necessary environment variables for full control when necessary (for CI servers or resets).

Not stating we must revert these changes, just offering an alternative for consideration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% sure I understand, but I agree with it in principle so I'd be happy to 👍 a PR that does this?

@jkmassel jkmassel force-pushed the add/preload-list-tests branch from f59acb1 to c82027d Compare December 17, 2025 20:17
@jkmassel jkmassel merged commit 704fbbd into trunk Dec 17, 2025
11 checks passed
@jkmassel jkmassel deleted the add/preload-list-tests branch December 17, 2025 20:50
@dcalhoun
Copy link
Member

@jkmassel it seems the automated Swift tests fail in trunk after this merge. Strangely, the tests seemingly pass for PR runs.

dcalhoun added a commit that referenced this pull request Dec 19, 2025
Ideally, the `makefile` serves as the de facto interface for project
scripts. This avoids multiple sources of truth and simplifies project
onboarding and documentation.

Previously, rerunning various `make` targets resulted in rerunning the
expensive and slow `make build` target. It's important to ensure the
build output exists for many targets, but is often unnecessary to rerun
the build when running targets multiple times--e.g., Swift test targets.

This introduces a caching mechanism. The `make build` target skips
running and relies upon the cache unless one of the following is true.

- dist doesn't exist
- REFRESH_JS_BUILD is set to true or 1
- build was invoked directly

This enables quicker reruns while also ensure the build is always
recreated when important to do so--e.g., direct invocations, CI runs,
releases.

See #253 (comment)
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.

3 participants