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

@embroider/macros isDevelopingApp should be available in runtime (consistent with isTesting) #1998

Open
rtablada opened this issue Jun 20, 2024 · 1 comment

Comments

@rtablada
Copy link

When using @embroider/macros any use of isTesting used outside of a macroCondition will be built and rewritten to use an import from @embroider/macros/runtime. However, isDevelopingApp does not follow this behavior and was quite confusing when it would suddenly show up as an undeclared variable in our app code.

Since the two methods are described together in documentation, I think it would make sense to have similar runtime availability.

@ef4
Copy link
Contributor

ef4 commented Jun 20, 2024

isTesting has a runtime implementation because it can actually be changed at runtime (the test suite sets it to true). isDevelopingApp cannot be changed at runtime.

However, isDevelopingApp does not follow this behavior and was quite confusing when it would suddenly show up as an undeclared variable in our app code.

This sounds like a bug. It should never be an undeclared variable.

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

No branches or pull requests

2 participants