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

[ENHANCEMENT] Support converting gts files in blueprint #10332

Merged
merged 14 commits into from
Oct 17, 2023

Conversation

IgnaceMaes
Copy link
Contributor

Add support to convert .gts blueprint files to .gjs.

Unblocks emberjs/ember.js#20511 (comment)


fileInfo.rendered = transformed;
// removeTypes does not support GTS file format
if (path.extname(fileInfo.displayPath) === '.ts') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can this realistically be merged without support? For now it would unblock basic .gts blueprint files that don't contain any types. (e.g. template-only components)

I wonder what the actual support would look like. Should we first transform it to valid TS, remove types, and transform back to GJS?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd need a custom parser? or maybe a light process -- like -- extracting the template(s), running babel to remove types, placing the template(s) back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've implemented a simple, naive version of extracting the template - removing the types - and placing back the template.

It does the job for simple cases. However, as the removeTypes function from remove-types also does formatting it kind of messes with the replacing. Because of this I'm not confident it would handle every possible case well. But for the sake of blueprints it might be sufficient? (For now?)

@IgnaceMaes IgnaceMaes changed the title feat: support converting gts files in blueprint [ENHANCEMENT] Support converting gts files in blueprint Aug 2, 2023
@NullVoxPopuli NullVoxPopuli added this pull request to the merge queue Sep 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 19, 2023
@ef4 ef4 added this pull request to the merge queue Sep 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 26, 2023
@NullVoxPopuli NullVoxPopuli added this pull request to the merge queue Oct 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 3, 2023
@IgnaceMaes
Copy link
Contributor Author

Is there any action to take here, or are we just hoping CI will succeed on another retry? 😬

@ef4
Copy link
Contributor

ef4 commented Oct 11, 2023

I think we need to turn of the Merge Queue feature. It doesn't support rerunning failed tests, and we have some flaky windows tests that make it hard to get things through on a single pass.

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.

None yet

3 participants