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

fix(workspaces): workspace path constant cleared after first use #761

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

GitMurf
Copy link
Contributor

@GitMurf GitMurf commented Jan 29, 2025

Description

This is a weird one. I could not pinpoint the culprit, but if I started a chat convo, used /workspace slash command (works fine the first time), but then create a new convo and try /workspace slash again it gives a plenary error (see screenshot below).

The path arg going into the function is blank and somehow the CONSTANT for the path in that file is also suddenly blank.

You can see what I mean by the change in my commit (a couple lines). This solves my immediate problem but I have no clue if there is something more / deeper that has to be addressed 🤷‍♂️

Related Issue(s)

No idea but curious if this is somehow related to #756 ?

Screenshots

TabTip - Shell_Handwriting_Canvas_B4bKogwdUp_2025-01-28_22-14-58

Checklist

  • I've read the contributing guidelines and have adhered to them in this PR
  • I've updated the README and/or relevant docs pages

@GitMurf
Copy link
Contributor Author

GitMurf commented Jan 29, 2025

Not sure if this is another Windows issue 🤷‍♂️

@olimorris
Copy link
Owner

Really weird. I can confirm the same. Thanks for fixing either way.

@olimorris olimorris merged commit b39acc1 into olimorris:main Jan 29, 2025
2 of 3 checks passed
@GitMurf
Copy link
Contributor Author

GitMurf commented Jan 29, 2025

@olimorris fyi may be worth figuring out the "why" because it could be something that bites us somewhere else down the road too ;)

I tried to figure out where it could be going wrong but cannot and it doesn't make sense! The only thing I can think of is something mutates it "by ref" accidentally somewhere else up/down stream 🤷‍♂️ It certainly wasn't obvious though where / how that could have been based on the time I spent trying to trace it (but did not spend too much time).

@GitMurf
Copy link
Contributor Author

GitMurf commented Jan 29, 2025

The only thing I can think of is something mutates it "by ref" accidentally somewhere else up/down stream

Assuming lua works the same way as javascript, the path as a string should not mutate up/down stream so all I can think of is the parent constant object (table) CONSTANTS.WORKSPACE_FILE got reset or mutated somewhere else 🤷‍♂️ ??

@olimorris
Copy link
Owner

I've put this on my "lower priority" list. Still a priority but I wanted to tweak my workspace file for the plugin and then use it for problems such as this.

I think realistically, the constant manipulated has to be the answer. Wonder if setting path to a deep copy might fix this.

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.

2 participants