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

Renpy calls and ATL roadmap #5102

Open
4 of 8 tasks
Gouvernathor opened this issue Nov 7, 2023 · 2 comments
Open
4 of 8 tasks

Renpy calls and ATL roadmap #5102

Gouvernathor opened this issue Nov 7, 2023 · 2 comments
Assignees
Labels
crash or exception Issues causing renpy to quit unexpectedly, or to show the grey error screen. enhancement A proposed or requested enhancement or improvement to renpy's features. task Something that isn't an issue or an enhancement, but still needs to be done. unintended behavior Something not working the way it's supposed to, without causing a crash or exception

Comments

@Gouvernathor
Copy link
Member

Gouvernathor commented Nov 7, 2023

When an ATL transform is called, three things happen : the inner scope is updated (as with any call in renpy ot python), the parameters are curryfied and prepared for a potential next call, and the child of the transform is updated. All three of these are buggy.
Some parameters are not managed and treated as they should : pos-only are treated as pos-or-kw, required kw-only are not handled and cause exceptions, and variadic parameters are rejected at parse time. This affects the inner scope update and the correct currying of parameters for the next call.
The rules for setting the child are not consistent, resulting in the very function made to do it (At) failing in some edge cases, not to mention when you call the transform directly (not everyone uses At).

As a sidenote, a difficulty when currying ATL is that in the resulting signature, the default values of the passed parameters are actual, evaluated values, whereas a "raw" ATL transform has evaluable expressions as default values of the optional parameters. Properly managing that will probably require two Signature classes, or two Parameter classes, or both.
The current code gets around that by putting only required positional parameters in the signature, and treating values already in the scope as acceptable keyword-arguments. But that's incompatible with pos-only parameters, which set a matching entry in the scope yet aren't acceptable as keyword arguments.
From this point of view, enabling kw-only parameters will be simpler than enabling args, kwargs or pos-onlies.

Tasks

  1. other
  2. crash or exception enhancement
  3. crash or exception unintended behavior
    Gouvernathor
  4. enhancement
    Gouvernathor
@Gouvernathor Gouvernathor added crash or exception Issues causing renpy to quit unexpectedly, or to show the grey error screen. enhancement A proposed or requested enhancement or improvement to renpy's features. task Something that isn't an issue or an enhancement, but still needs to be done. unintended behavior Something not working the way it's supposed to, without causing a crash or exception labels Nov 7, 2023
@Gouvernathor Gouvernathor self-assigned this Nov 7, 2023
renpytom added a commit that referenced this issue Jun 26, 2024
Adresses most of the main points of #5102, and #4371.
The parameters that get fixed are still forbidden though, as are var-pos and var-kw parameters. That will be for another PR. But the implementation that goes with handling those is already here, commented-out for performance.

The solution to #4405 is there too but also commented out. That change will also go in separately.
@renpytom
Copy link
Member

@Gouvernathor Can you taker your new pull requests out of draft status, so I can merge them? (Also, a short description other than the title would help.)

@Gouvernathor
Copy link
Member Author

They are not tested and need to be, I will do it eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash or exception Issues causing renpy to quit unexpectedly, or to show the grey error screen. enhancement A proposed or requested enhancement or improvement to renpy's features. task Something that isn't an issue or an enhancement, but still needs to be done. unintended behavior Something not working the way it's supposed to, without causing a crash or exception
Projects
None yet
Development

No branches or pull requests

2 participants