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

Add failing byte_order_mark test #11688

Merged
merged 4 commits into from
Aug 16, 2021
Merged

Add failing byte_order_mark test #11688

merged 4 commits into from
Aug 16, 2021

Conversation

ry
Copy link
Member

@ry ry commented Aug 13, 2021

No description provided.

Doesn't fully fix the issue... there is still something going on with v8 returning the wrong specifier. I think we need to strip the BOM there too.
@@ -392,10 +393,15 @@ pub fn parse(
source: &str,
media_type: &MediaType,
) -> Result<ParsedModule, AnyError> {
let source = strip_bom(source);
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't fix the entire issue. I wonder if we should be doing this at a higher level?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is it V8 that is barfing on it?

Copy link
Member

@dsherret dsherret Aug 13, 2021

Choose a reason for hiding this comment

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

Yes. In core::modules::ModuleMap::new_module module_request.get_specifier(). I haven't looked into it too much.

It's strange that cargo test passes yet running the command explicitly fails. I just did a cargo clean && cargo build && ./target/debug/deno run --no-check cli/tests/testdata/byte_order_mark.ts and it fails.

Copy link
Member

Choose a reason for hiding this comment

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

Wow, that was weird. I looked into this again just now and ran:

./target/debug/deno run cli/tests/testdata/byte_order_mark.ts

...then it suddenly started working again next time I provided --no-check. Caching issue? Anyway, this should be good to go.

@ry ry merged commit 163f2ef into denoland:main Aug 16, 2021
@ry ry deleted the byte_order_mark branch August 16, 2021 07:28
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.

2 participants