Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update full-moon to support string interpolation #126

Merged
merged 2 commits into from
Feb 27, 2023
Merged

Update full-moon to support string interpolation #126

merged 2 commits into from
Feb 27, 2023

Conversation

TreehouseFalcon
Copy link
Contributor

I believe full-moon added support for Luau string interpolation in v0.17.0 via crates.io. Using string interpolation in files with doc comments results in failure to build.

@TreehouseFalcon
Copy link
Contributor Author

I'll have to take a look later at what's wrong with these tests. If someone else who has more experience with Rust than me knows what's going on, feel free to jump in.

@evaera
Copy link
Owner

evaera commented Jan 23, 2023

It looks like the line number that full_moon/moonwave is reporting in the snapshot tests have changed as a result of updating full_moon. That's the only difference I see.

-      "line": 22,
+      "line": 14,

This is a pretty significant difference though. I wonder if something in full_moon changed re line numbers

    4     4 │     "types": [],
    5     5 │     "name": "indentation",
    6     6 │     "desc": "This description starts one line down,\n\nAnd has a line in the middle, followed by trailing lines.\n\n```lua\nfunction test()\n\tprint(\"indentation\")\n\n\tdo\n\t\tprint(\"more indented\")\n\tend\nend\n```",
    7     7 │     "source": {
    8       │-      "line": 22,
          8 │+      "line": 14,
    9     9 │       "path": ""
   10    10 │     }
   11    11 │   }
   12    12 │ ]

--[=[
This description starts one line down,
And has a line in the middle, followed by trailing lines.
```lua
function test()
print("indentation")
do
print("more indented")
end
end
```
@class indentation
]=]

We can see from this source that the correct line number is 22 as moonwave reports line numbers of last line of the doc comment plus one, so something about the new full_moon version is causing incorrect line numbers

@evaera evaera merged commit a78c80c into evaera:master Feb 27, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants