Skip to content

Conversation

@ZZZank
Copy link
Contributor

@ZZZank ZZZank commented Dec 6, 2025

Current TypeInfo system works good enough in common use cases, but there still some rough corners / lack of design / overengineering that need to be polished.

All changes are documented in commit messages. Notable changes are:

  • TypeInfoFactory.NO_CACHE is removed, because it's unable to handle self referencing type variables, e.g. E extends Enum<E>
  • Support for Outer<T1>.Inner style parameterized type, including correct formatting and consolidation mapping generation.
  • TypeFormatContext is redesigned to be more consistent and easy to use.

@ZZZank ZZZank marked this pull request as ready for review December 7, 2025 16:19
Copy link
Contributor

@aardvark179 aardvark179 left a comment

Choose a reason for hiding this comment

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

I think this is okay, but if you are going to do a big stack of commits as a PR with the expectation that it's review as that stack of commits then it's helpful to do spotless as you go, and apply any cleanup as a fix up commit. That way people won't stack up a bunch of comments on earlier commits that are then fixed up later—GH doesn't help hear by highlighting that those lines don't make it to the end.

ignoring from: "org.mozilla.javascript.lc.type.TypeInfo", to: "org.mozilla.javascript.lc.type.impl.*"
ignoring from: "org.mozilla.javascript.lc.type.TypeFormatContext", to: "org.mozilla.javascript.lc.type.impl.ClassSignatureFormatContext"

ignoring from: "org.mozilla.javascript.lc.type.*", to: "org.mozilla.javascript.lc.type.impl.*"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth taking a look at the overall recycle rules for our base package lc.type as we keep having to fix them during development. If the intention is that they reflect the future separation of the lc components from the main Rhino module then lc should have access to whatever is exported from the main module, and we really shouldn't care about anything more precise than that.

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.

2 participants