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

Profiles #160

Open
LPGhatguy opened this issue Apr 18, 2019 · 1 comment
Open

Profiles #160

LPGhatguy opened this issue Apr 18, 2019 · 1 comment
Labels
scope: cli Relevant to the Rojo CLI type: enhancement Feature or improvement that should potentially happen

Comments

@LPGhatguy
Copy link
Contributor

Depends on #95.

We've been talking a lot about how to enable users to enable debug versions of libraries like Roact where they can have extra development information. One way to accomplish this would be to allow Rojo to reason about different profiles.

Profiles in this proposal would let Rojo pick a different project file by default instead of default.project.json.

For a first pass, you could imagine a user invoking a command like:

rojo build --profile debug -o Place.rbxlx

When loading this project and any nested projects (like Roact), Rojo would first look for a project name like profile-debug.project.json to try to use instead. These alternate projects could enable extra debugging features like additional stack traces by using a different entrypoint or even enabling a special Rojo server plugin.

A future version could shape the argument to the --profile flag to be similar to the Rust library env_logger's RUST_LOG environment variable. For example, to enable debugging just for Roact:

rojo build --profile "Roact=debug" -o Place.rbxlx

Open Questions

  1. Would we promote default.project.json containing the release or debug configuration? This changes whether users use --profile debug or --profile release. Node's NODE_ENV environment traditionally defaults to debug.
  2. What file name would we use for projects with alternate profiles? debug.project.json, profile-debug.project.json, debug.profile.json?
  3. How does this interact with the non-modal settings we want to make configurable in the future, like logging?
@LPGhatguy LPGhatguy added type: enhancement Feature or improvement that should potentially happen scope: cli Relevant to the Rojo CLI labels Apr 18, 2019
@LPGhatguy
Copy link
Contributor Author

We've had a lot of discussion about this at Roblox.

Two possible solutions we've thought of instead of profiles:

  1. Point people to Remodel, which enables scripting a build pipeline programmatically, including doing debug-y things to a tree of instances. Currently doesn't interact with live sync sadly.
  2. Implement a version of Rojo projects that are defined as Lua files, enabling branching on debug settings. This has precedent in the JS ecosystem, for better or worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: cli Relevant to the Rojo CLI type: enhancement Feature or improvement that should potentially happen
Projects
None yet
Development

No branches or pull requests

1 participant