Skip to content

Conversation

@out-of-phaze
Copy link
Contributor

A bunch of fixes/improvements to typemaker inference, plus:

  • DMValueType.Instance is now the default when doing as /some/typepath.
  • as path(/some/typepath) can be used to specifically denote 'a typepath of type /some/typepath'.
  • Lists can now have types provided: as /list(some union astypes here) for normal lists, as /list(some union astypes here, some others here) for associative lists. Empty lists currently always match all typed lists because type info is not tracked at runtime. Similarly, a list with only keys and no associated values can match a typed associative list (this was necessary to fix some stuff on TG, and besides, it's hard to differentiate between list("foo") and list("foo" = null).
  • An experimental as params[1] astypes syntax has been added. You can also even do as params[1] as instance to denote that, if params[1] is a path, this value is an instance with the same type. (This is useful for singleton getters.)

I beg you, please help me find some other way to do the params stuff other than just threading procParameters through the entire parser. It's SO BAD. I hate it. Can it go on like expressionContext or something????

Rebasing this was a pain and stuff might be totally broken, but I'm gonna throw it at some codebases to make sure it doesn't totally explode.

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Feb 6, 2025
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

InspectCode found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@out-of-phaze out-of-phaze force-pushed the experiment/typemaker-1.1-rebase branch from e14baf9 to 004b1d9 Compare February 23, 2025 03:08
@out-of-phaze out-of-phaze force-pushed the experiment/typemaker-1.1-rebase branch from 004b1d9 to 1918f37 Compare February 23, 2025 05:12
@github-actions
Copy link

github-actions bot commented May 5, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@wixoaGit
Copy link
Member

Closing in favor of #2313

@wixoaGit wixoaGit closed this Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler Involves the OpenDream compiler Merge Conflict size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants