Skip to content

Conversation

karl-police
Copy link
Contributor

@karl-police karl-police commented Jul 27, 2025

How do you even properly commit a pull request, I am copy pasting manually, I am not even using git diff and I don't want to make a separate branch and swap to it to do a pull request, because it breaks my CMake, someone please tell me! 🙏

Like, I literally copy pasted the code manually from Visual Studio into this PR. Because I cloned master, and made this changes on a modified branch of mine that has debug logging, but I don't want to PR the debug logging as well, only specific commits, so... yeah... 🤷

Do I have to make another clone of luau and put it in another folder and name it like luau2 and keep both in-sync or something?
And then use git diff and send the changes to luau2 and use that to make PRs?

Hence why, someone please tell me 🙏

 

Anyways, I commited, and I succeeded. That's because I was told what writer.advance does.

At the beginning I actually took this route: https://paste.ivr.fi/olulyniwah.cpp

 

Except there's one thing it doesn't do, it doesn't know about ( positions and it doesn't make a space àfter a -> if there's no CstNode present.

This could be fixed in this pull request, simply by adding else like so, and have the Unit Test adjusted manually, but I don't know if I should, plus edit access is enabled.

if (cstNode)
    advance(cstNode->returnArrowPosition);
else
    space();

Then I fixed this issue https://discord.com/channels/385151591524597761/906369439262461992/1399132629592309800

image image

If there are Attributes present for AstStatDeclareFunction. The AST node would not update the location to the beginning of the attribute's start location. This is fixed now.

Not fixing this would break the other spaces for writer.advance and it took me a bit to figure this all out in the first place. :/

@karl-police karl-police deleted the patch-2 branch July 27, 2025 22:30
@karl-police karl-police restored the patch-2 branch July 27, 2025 22:30
@karl-police
Copy link
Contributor Author

good one GitHub

@karl-police karl-police reopened this Jul 27, 2025
Copy link
Contributor Author

@karl-police karl-police left a comment

Choose a reason for hiding this comment

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

I added LuauParseFixASTDeclareFunctionLocationStart and moved the logic before the function gets called since start is a passed argument and it's right within the "parse attribute" logic.

@karl-police
Copy link
Contributor Author

Does someone have an answer for this? 🤔

How do you even properly commit a pull request, I am copy pasting manually, I am not even using git diff and I don't want to make a separate branch and swap to it to do a pull request, because it breaks my CMake, someone please tell me! 🙏

Like, I literally copy pasted the code manually from Visual Studio into this PR. Because I cloned master, and made this changes on a modified branch of mine that has debug logging, but I don't want to PR the debug logging as well, only specific commits, so... yeah... 🤷

Do I have to make another clone of luau and put it in another folder and name it like luau2 and keep both in-sync or something?
And then use git diff and send the changes to luau2 and use that to make PRs?

Hence why, someone please tell me 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants