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

Prevent building model as a place and vice versa #736

Open
Dekkonot opened this issue Jul 14, 2023 · 1 comment · May be fixed by #772
Open

Prevent building model as a place and vice versa #736

Dekkonot opened this issue Jul 14, 2023 · 1 comment · May be fixed by #772
Labels
scope: cli Relevant to the Rojo CLI size: small status: in-progress Someone is working on this last time we checked. type: enhancement Feature or improvement that should potentially happen

Comments

@Dekkonot
Copy link
Member

Currently, we trust the user to choose their own extension when building. However, this allows mistakes because people can build models as place files or vice versa.

Given that this should be as easy as checking whether the root of a file is a DataModel, it should be trivial to check whether the correct type of file is being built for the specified extension. We should probably do that.

@Dekkonot Dekkonot added type: enhancement Feature or improvement that should potentially happen scope: cli Relevant to the Rojo CLI size: small labels Jul 14, 2023
@boatbomber
Copy link
Member

boatbomber commented Jul 15, 2023

We have protections for syncing a model into a place on the Studio plugin side, but honestly we should probably warn/forbid serving a model in the first place since there's no context in which that makes sense as far as I'm aware.

I think a PR for this should cover build and sync, since it'd be more or less the same line of code in both places.

@kennethloeffler kennethloeffler added the status: in-progress Someone is working on this last time we checked. label Feb 15, 2024
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 size: small status: in-progress Someone is working on this last time we checked. type: enhancement Feature or improvement that should potentially happen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants