Skip to content

Conversation

@ffrostfall
Copy link

Closes #288

This PR implements support for Rojo sourcemaps emitted with --absolute

Copy link
Contributor

@jeparlefrancais jeparlefrancais left a comment

Choose a reason for hiding this comment

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

This is a great start!

There could also be an integration test with an absolute Rojo sourcemap. You could generate a test setup similar to those in tests/test_cases/sourcemap/*

node.file_paths.iter().any(|file_path| {
if file_path.is_absolute() {
file_path.to_path_buf()
== path::absolute(target_path).expect("failed to convert")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to avoid calling path::absolute since this does not work well when darklua runs in-memory. Ideally we'd pre-compute all we need inside the initialize method.

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.

Absolute paths in the sourcemap do not work when using convert_require with roblox require mode

2 participants