Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: List of patches to review (mainly for named reference)



I refined my patch that simplifies resolve_nameref and setscope and extracted a few more independent patches. Below is the full list of patches on which it depends, in the order I have applied them.

The first 4 patches build each on top of the preceding ones:

Fix loading of autoload variables accessed via references. - workers/53781
Don't follow namerefs when computing base scope of nameref (part 1). - workers/53782
Don't follow namerefs when computing base scope of nameref (part 2). - workers/53782
Only ever compute a base scope for non-upper references. - workers/53782

The next 3 patches are standalone:

Fix type conversions via assignments to references. - workers/53788
Remove bogus PM_LOCAL from call to resolve_nameref in setscope. - workers/53796
Remove bogus PM_LOCAL from the call to resolve_nameref in createparam. - workers/53797

The next 2 patches, the second builds on the first one:

Remove bogus self reference warning. - workers/53790
Fix imprecise invalid reference warning. - workers/53790

The next patch depends on the first 4 and the last 2:

Fix error signaling for reference loops. - workers/53798

The last patch is standalone:

Remove invalid upscope from createparam. - workers/53676
Bart, you had concerns about the scope in which assignments to not-yet-defined references should create a new variable, which currently is the global scope. A related issue is how "typeset <options but no -n> ref=..." statements behave when "ref" is a reference and no "-n" option is included. I noticed that such statements exhibit inconsistencies and outright bugs. I will eventually share something about that. However, all these issues are orthogonal to what this patch fixes. So I think it could be submitted and we can resolve these issues separately.

Here is the full list of prerequisite and simplification patches.


Something completely unrelated but that I think was already reviewed and only needs to be submitted:

Don't allow exec in always blocks. - workers/53732

Philippe


On Sat, Jun 14, 2025 at 11:16 AM Philippe Altherr <philippe.altherr@xxxxxxxxx> wrote:
In my opinion, the highest priority should be to submit the patch that simplifies resolve_nameref and setscope (workers/53740) as this will ease other changes.

The following patches are 4 prerequisites, where each depends on the previous one:

Fix loading of autoload variables accessed via references. - workers/53781

Another orthogonal prerequisite (it eliminates the "BUG: local parameter is not unset" debug messages):

- Fix type conversions via assignments to references. - workers/53784
  (The code is ready but I should still add tests.)

Two other likely prerequisites (I'm not 100% sure they are real prerequisites):


One last likely prerequisite:

  You had concerns about the scope in which assignments to not-yet-defined references should create a new variable, which currently is the global scope. A related issue is how "typeset <options but no -n> ref=..." statements behave when "ref" is a reference and no "-n" option is included. I noticed that such statements exhibit inconsistencies and outright bugs. I will eventually share something about that. However, all these issues are orthogonal to what this patch fixes. So I think it could be submitted and we can resolve these issues separately.

Something completely unrelated but that I think you already reviewed and only needs to be submitted:

  
Philippe



Messages sorted by: Reverse Date, Date, Thread, Author