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

Finished tracing out scope to its sources in drasil-code #3888

Closed
wants to merge 1 commit into from

Conversation

B-rando1
Copy link
Collaborator

@B-rando1 B-rando1 commented Jul 26, 2024

For the most part this went pretty smoothly. There was definitely ample opportunity for mistakes though, so hopefully we can find a way to spot them.

In order to test them, I'm thinking of modifying one of the renderers to prepend global., local., or mainFn. to each variable. This will let us test everything and give us some empirical assurance.

Contributes to #3821

In `drasil-code`, I should be done assigning all variables their proper
scope.  There's definitely a good chance I made some mistakes, but
hopefully we can spot them during testing.
Copy link
Owner

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

So I'm approving, in that the code is clean and works, but I'm not going to merge as I want a further investigation first: since this is all done in GenState, maybe this could / should be done that way? i.e. add a notion of scope to DrasilState and then use get/set to work with them. That would end up requiring many fewer code changes.

@B-rando1
Copy link
Collaborator Author

That's a good point. I had it in the back of my mind that there's probably a better way to do this, but I guess I didn't want to lose momentum. I agree that integrating it into GenState would lead to a cleaner result.

@B-rando1
Copy link
Collaborator Author

I implemented these changes using GenState, as you recommended. The PR is here: #3899.

@B-rando1 B-rando1 closed this Jul 31, 2024
@balacij
Copy link
Collaborator

balacij commented Jul 31, 2024

Should we delete the branch? It has unmerged commits.

@B-rando1
Copy link
Collaborator Author

B-rando1 commented Aug 1, 2024

That should be fine. It was a step in the wrong direction, so we don't want the changes. It was helpful in that it helped me know where the scope needs to be changed in #3899, but since that's done we should be good to delete it.

@B-rando1 B-rando1 deleted the GlobalLocalScope branch August 1, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants