-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
@next/font/google: Hash filenames used in virtual file paths #2978
@next/font/google: Hash filenames used in virtual file paths #2978
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Ignored Deployments
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
63c7c65
to
e44a57b
Compare
e3d8989
to
684c912
Compare
68efe7f
to
5432699
Compare
684c912
to
2d9d332
Compare
5432699
to
5ae3f2a
Compare
2d9d332
to
cb3939d
Compare
5ae3f2a
to
a51a973
Compare
cb3939d
to
ba7be00
Compare
a51a973
to
75bbdd5
Compare
ba7be00
to
a2d21a2
Compare
75bbdd5
to
a3dc900
Compare
a2d21a2
to
aca84ad
Compare
a3dc900
to
1d886f6
Compare
aca84ad
to
a20e32f
Compare
Co-authored-by: Leah <github.leah@hrmny.sh>
a20e32f
to
89a8cd7
Compare
Benchmark for cab5e3eClick to view benchmark
|
🟢 CI successful 🟢Thanks |
async fn get_request_id(query_vc: QueryMapVc) -> Result<StringVc> { | ||
let query = &*query_vc.await?; | ||
let query = query.as_ref().context("Query map must be present")?; | ||
let mut to_hash = vec![]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: There's no need to build a vec for this, using a Xxh3Hash64Hasher
instance will allow you to compute this piecemeal.
Also, is this query sorted? We should consider ?a=b&c=d
to be equal to ?c=d&a=b
for hashing.
…turbo#2978) * Implement `DeterministicHash` for `&str` * @next/font/google: Hash filenames used in virtual file paths * Apply suggestions from code review Co-authored-by: Leah <github.leah@hrmny.sh> Co-authored-by: Leah <github.leah@hrmny.sh>
…turbo#2978) * Implement `DeterministicHash` for `&str` * @next/font/google: Hash filenames used in virtual file paths * Apply suggestions from code review Co-authored-by: Leah <github.leah@hrmny.sh> Co-authored-by: Leah <github.leah@hrmny.sh>
Fixes WEB-289.
This uses hex-encoded hashes so that filenames for virtual assets for @next/font/google are unique. Previously, every virtual asset generated by @next/font/google would have the same path to the asset, impacting the quality of sourcemaps. This also keeps the basename consistent between the js and css module counterparts.
This also implements
DeterministicHash
for the&str
type.Test Plan: Given
...Chrome shows a tree of sourcemapped sources of:
and that the contents of each pair of basenames reflect the same imported font.