Skip to content

Set transform tokensset#708

Open
mrginglymus wants to merge 3 commits intoterrazzoapp:mainfrom
mrginglymus:set-transform-tokensset
Open

Set transform tokensset#708
mrginglymus wants to merge 3 commits intoterrazzoapp:mainfrom
mrginglymus:set-transform-tokensset

Conversation

@mrginglymus
Copy link
Copy Markdown
Contributor

Changes

ensures that setTransform looks up tokens on the applied input rather than the default input.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: 07ef9bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mrginglymus mrginglymus force-pushed the set-transform-tokensset branch from e1d1f2b to 07ef9bb Compare March 24, 2026 10:32
@mrginglymus
Copy link
Copy Markdown
Contributor Author

Hmm, this has had a wider impact that anticipated.

Some of the changes just look like re-ordering, but there are also some dropped tokens. Is this a caching issue again?

@drwpow
Copy link
Copy Markdown
Collaborator

drwpow commented Apr 9, 2026

Hmm, this has had a wider impact that anticipated.

Some of the changes just look like re-ordering, but there are also some dropped tokens. Is this a caching issue again?

Yeah possibly. I think as an approach we DON’T want to call resolver.apply(params.input ?? {}) here because this would automatically break many valid resolvers without defaults in modifiers. We may have to do something earlier, where as we’re parsing files, we just build a tokens list of all IDs as we’re crawling.

There’s a refMap data structure where we reference which tokens should alias to what. I forget if we always add all tokens to that structure, but it wouldn’t hurt to simply add all tokens as we encounter them there (even if the alias is nothing), and then we’d at least have a complete list of every ID encountered.

Anyway doing something more “active” like this would be better performance-wise and all.

But also, yes, it does seem like there may be a caching issue, too 🤔. Maybe we can figure that out separately if we can get around calling .apply() without the user requesting it.

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.

setTransform fails if token not present in default input

2 participants