Skip to content

Expose SectionContext#8158

Merged
sovdeeth merged 2 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/expose-section-context
Aug 30, 2025
Merged

Expose SectionContext#8158
sovdeeth merged 2 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/expose-section-context

Conversation

@sovdeeth
Copy link
Member

@sovdeeth sovdeeth commented Aug 27, 2025

Problem

Testing in the addon development channel has revealed an issue when attempting to manually parse expressions, often as parts of sections or structures. The core issue is the inability for an addon to update SectionContext and tell the parser what section it's parsing. This manifests in different ways depending on the use case. In SkCheese, an infinite parsing loop can be created with the new string expression section where not updating the SectionNode in SectionContext leads to the same Node being parsed again and again, but always being given its parent node in init(). In Oopsk, it can manifest where a field in a struct instance section containing a section expression claims its parent section leading to a double-claim. In Jake's unreleased packet addon, it leads to a strange error where a nested section using an EntryValidator is given the wrong SectionNode and claims itself is an unexpected entry.

Solution

Makes SectionContext and SectionContext#modify() public for addon use.

Testing Completed

None, no logic change was made.

Supporting Information

Relevant conversation: https://discord.com/channels/135877399391764480/836696328796897340/1409833163143905361


Completes: none
Related: none

@sovdeeth sovdeeth requested a review from a team as a code owner August 27, 2025 04:59
@sovdeeth sovdeeth requested a review from a team as a code owner August 27, 2025 04:59
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Aug 27, 2025
@sovdeeth sovdeeth requested review from UnderscoreTud and erenkarakal and removed request for a team August 27, 2025 04:59
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Aug 27, 2025
@sovdeeth sovdeeth moved this to In Review in 2.12 Releases Aug 27, 2025
Copy link
Member

@erenkarakal erenkarakal left a comment

Choose a reason for hiding this comment

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

skcheese mentioned

@skriptlang-automation skriptlang-automation bot added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Aug 27, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Aug 27, 2025
@skriptlang-automation skriptlang-automation bot removed the needs reviews A PR that needs additional reviews label Aug 27, 2025
@sovdeeth sovdeeth merged commit 048665f into SkriptLang:dev/patch Aug 30, 2025
5 checks passed
@skriptlang-automation skriptlang-automation bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. labels Aug 30, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.12 Releases Aug 30, 2025
@Absolutionism Absolutionism moved this from Done - Awaiting Release to Done - Released in 2.12 Releases Sep 2, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

No open projects
Status: Done - Released

Development

Successfully merging this pull request may close these issues.

3 participants

Comments