question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Roblox Lua

See original GitHub issue

Environment

name version
IDEA version CL2021.2 RC
Luanalysis version v1.3.0
OS OSX 11.5.1

What are the steps to reproduce this issue?

  1. Use Roblox Lua type features:
local Constants = require(script.Parent.Constants)
type Passthrough<T> = Constants.Passthrough<T | nil, any?>
type Set<T> = {
	size: number,
	-- method definitions
	add: (Set<T>, T) -> Set<T>,
	clear: (Set<T>) -> (),
	delete: (Set<T>, T) -> boolean,
	has: (Set<T>, T) -> boolean,
	ipairs: (Set<T>) -> any,
}
type Array<T> = { [number]: T }
local myArray: Array<string> = { "hello", "world"}
local mySet: Set<Array<Passthrough<number>>> = Set.new()
mySet:add({math.huge, 2, Constants.ZERO})
  1. See parse errors

What happens?

Some basics of Roblox Lua get parse errors very early in the file, resulting in most navigation features not working.

What were you expecting to happen?

The ability for the plugin to auto-detect the variant of Lua and to support navigation (control/command+click, etc).

Any logs, error output, etc?

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Benjamin-Dobellcommented, Apr 11, 2022

In Github issues, if we can restrict the analysis of semantics to code, that’d be most appreciated 🙂 Thanks!

1reaction
matthargettcommented, Apr 9, 2022

@matthargett Do Roblox have a developer tooling team that is interested in stuff like Luanalysis? If so, I’d be keen to have a chat. Feel free to email me. If not, no worries 😂

There is a developer tooling team, and a languages team. I don’t know that either would be explicitly interested in this project, but I don’t speak for them – just myself 😃

The language grammar specification and parser source code are all public, with reference implementations in C++ at GitHub.com/Roblox/luau and in Rust at github.com/Kampfkarren/full-moon .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest Scripting Support topics - DevForum | Roblox
Topic Replies Views Activity About the Scripting Support category 0 52354 July 28, 2017 Parent property is locked 16 13219 December 19, 2022 DataStore2 works only...
Read more >
Scripting Helpers - Roblox Q&A
A Roblox Q&A website · Today's Top Users · About Us · Questions and Help.
Read more >
Getting Started With Roblox Scripting - Game Design
There's some good news: the Roblox coding language can help build your game in no time and share it with other passionate players....
Read more >
Newest 'roblox' Questions - Stack Overflow
Roblox is an online development platform, created in 2006, and targeted at children and youth. Roblox uses a modified version of Lua, known...
Read more >
Roblox Lua Style guide
This style guide aims to unify as much Lua code at Roblox as possible under the ... This is different than normal code;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found