Skip to content

[CLEANUP] Cleanup "octane edition" code #20863

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

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

Windvis
Copy link
Contributor

@Windvis Windvis commented Mar 3, 2025

Octane has been the default for multiple major versions, so we can remove and simplify the code.

@Windvis Windvis changed the title Cleanup octane edition code Cleanup "octane edition" code Mar 3, 2025
@Windvis Windvis changed the title Cleanup "octane edition" code [CLEANUP] Cleanup "octane edition" code Mar 3, 2025
Octane has been the default for multiple major versions, so we can remove and simplify the code.
@Windvis Windvis force-pushed the octane-edition-cleanup branch from 7b0511f to faffa24 Compare March 3, 2025 09:56
@Windvis Windvis marked this pull request as ready for review March 3, 2025 09:57
Comment on lines -92 to -121
let message = [];

if (optionalFeaturesMissing) {
message.push(
`* the @ember/optional-features addon is missing, run \`ember install @ember/optional-features\` to install it`
);
}

if (message.length > 0) {
message.unshift(
`You have configured your application to indicate that it is using the 'octane' edition (via \`setEdition('octane')\`), but the appropriate Octane features were not enabled:\n`
);

throw new SilentError(message.join('\n\t'));
}
} else {
throw new SilentError(
'The Ember Classic edition has been removed. Specifying "classic" in your package.json, or not specifying a value at all, is no longer supported. You must explicitly set the "ember.edition" property to "octane". You can also run `npx @ember/octanify` to do this. \n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_editions-classic'
);
}

if (
!optionalFeaturesMissing &&
optionalFeatures.isFeatureEnabled('jquery-integration') &&
typeof optionalFeatures.isFeatureExplicitlySet === 'function' &&
optionalFeatures.isFeatureExplicitlySet('jquery-integration')
) {
throw new SilentError(
'Setting the `jquery-integration` optional feature flag to `true` was deprecated in Ember 3.x and removed in Ember 4.0.0. You must add the `@ember/optional-features` addon and set this feature to `false`.\n\nFor more information, see the deprecation guide: https://deprecations.emberjs.com/v3.x/#toc_optional-feature-jquery-integration'
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about this change. I think we can simply remove these errors, but we could also keep them around (without the octane check).

Copy link
Contributor

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

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

lgtm

@ef4 ef4 merged commit 3e61562 into emberjs:main Mar 8, 2025
27 checks passed
@Windvis Windvis deleted the octane-edition-cleanup branch March 8, 2025 15:13
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.

3 participants