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

Typemaker 1.1 - fixes and improvements #2072

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

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

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Oct 31, 2024
@out-of-phaze out-of-phaze force-pushed the experiment/typemaker-1.1 branch from dfb49e9 to 0157609 Compare October 31, 2024 17:19
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.

@out-of-phaze out-of-phaze force-pushed the experiment/typemaker-1.1 branch 3 times, most recently from e04e0ca to f4ad807 Compare October 31, 2024 19:53
@out-of-phaze out-of-phaze marked this pull request as draft November 3, 2024 22:51
@github-actions github-actions bot added size/XXL and removed size/XL labels Nov 8, 2024
@out-of-phaze out-of-phaze marked this pull request as ready for review November 8, 2024 15:53
Copy link

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

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.

1 participant