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

Implements RFC 496 Incorrectly #713

Open
ef4 opened this issue Jun 15, 2021 · 1 comment
Open

Implements RFC 496 Incorrectly #713

ef4 opened this issue Jun 15, 2021 · 1 comment

Comments

@ef4
Copy link
Contributor

ef4 commented Jun 15, 2021

ember-cli-htmlbars configures:

import { precompileTemplate } from '@ember/template-compilation'

to mean both createTemplateFactory and the wire format compilation. But that contradicts the RFC, which says that precompileTemplate is supposed to only produce the wire format.

The thing that's being implemented here is really compile, not precompile. compile is the one that automatically includes both steps.

The RFC muddies these waters by implying that compile would be for runtime compilation vs build-time compilation, but even if that is a true distinction we want to maintain, then we still need something that means "both steps, but at build time".

I would argue that precompile already means that in practice because of how it's implemented, and we could amend the RFC to make that clear.

@ef4
Copy link
Contributor Author

ef4 commented Jun 15, 2021

The question is, is there a use case for the low-level, wire-format-only feature that the RFC describes for precompile. I would argue there is not. The only public API for what you can do with wire format templates is pass them to createTemplateFactory, so why would you need to make a wire format template that's not wrapped in it?

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

1 participant