Skip to content

Conversation

karthik2804
Copy link
Collaborator

Bumps ComponentizeJS which brings in a newer build of StarlingMonkey but we loose aot. I have currently not removed the option but just print a warning and continue with building without it. If there are strong preferences, I am happy to delete it.

It will be a breaking change, strictly speaking, but I do not think aot has been advertised in the Spin docs, and I'm also not sure if it is widely used.

@karthik2804 karthik2804 force-pushed the build_tools/update_cjs branch from 9e1d0e0 to da0465f Compare September 12, 2025 06:04
@tschneidereit
Copy link
Collaborator

Bumps ComponentizeJS which brings in a newer build of StarlingMonkey but we loose aot. I have currently not removed the option but just print a warning and continue with building without it. If there are strong preferences, I am happy to delete it.

I think the best thing for now would be to make it a hard error instead of a warning: we shouldn't just silently build something with very different properties from what the user expected.

It will be a breaking change, strictly speaking, but I do not think aot has been advertised in the Spin docs, and I'm also not sure if it is widely used.

Given that we've never documented this, I think I agree that it's okay not to treat this as a breaking change, yeah. Over in CJS, we decided that it needs to be a breaking change, but there it was fully documented, so the situation was different.

Copy link
Collaborator

@tschneidereit tschneidereit left a comment

Choose a reason for hiding this comment

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

LGTM with comment addressed.

Comment on lines 90 to 93
console.warn(
'Warning: AOT compilation is temporarily disabled due to issues with componentize-js. Proceeding without AOT. It may be removed in future releases.',
);
CliArgs.aot = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

As mentioned, I think we should make this a hard error, not a warning.

Suggested change
console.warn(
'Warning: AOT compilation is temporarily disabled due to issues with componentize-js. Proceeding without AOT. It may be removed in future releases.',
);
CliArgs.aot = false;
throw new Error(
'AOT compilation is currently unavailable. Remove the `aot` option to proceed.',
);

Additionally, I think we should add a hidden: true field to the yargs options for aot over in cli.ts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Between this option and potentially just removing the option. Do you have a preference?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this option would be better: we don't know if someone looked at the --help output or the source and is using this in the wild after all. In that case, getting an explanation is definitely better than the option just disappearing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done will update.

Signed-off-by: Karthik Ganeshram <[email protected]>
@karthik2804 karthik2804 merged commit cc30aca into spinframework:main Sep 15, 2025
11 checks passed
@karthik2804 karthik2804 deleted the build_tools/update_cjs branch September 15, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants