-
Notifications
You must be signed in to change notification settings - Fork 48
Fix sidecar in website #2815
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
base: main
Are you sure you want to change the base?
Fix sidecar in website #2815
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@alex-ju I'm looking at this to see if I remember something more of what I did and why |
@alex-ju something very weird is happening here. I need to investigate more... |
@alex-ju I went back to a previous commit (#2361 and since then the logic has not been changed); then I looked at how the code would be compiled, and from what I see it's compiled as one would expect: So it must be something not related to our code but to the compilation itself. Could it be something introduced with the migration to pnpm? @aklkv can you think of something that could change so drastically the code compilation? |
The compiled code is the same, from what I've seen, but the computed value for frontmatter is different – I saw the same results in my debugging with the ones you shared above. This makes me think that the issue has to do with various async tasks taking longer or shorter than before (potentially after the pnpm migration), but couldn't get to the bottom of it. |
@alex-ju @aklkv I was able to narrow down the PR that introduced this regression and it is this one: #2729 This is the generated code when you check out #2708 which is the previous PR that was committed: as you can see the This instead is the generated code when you check out #2729: As you can see, the logical evaluation has disappeared, and the I am not sure how to debug more this, probably @aklkv may have some ideas of what may be? PS for context, if I change this line:
to this:
suddenly the compiler changes how the logic is converted to something that "works": So it must be a compilation problem, not a source code problem. |
📌 Summary
Fix the sidecar in
website
by ensuring thelayout
object exists. While the fix doesn't demystify the root cause it does seem to fix the immediate issue. I suspect a mix of race andfrontmatter
object override.To test the fix run
ember s --environment=production
to get prember to serve static assets./about/principles
is a good page to check the sidecar doesn't render.🔗 External links
Jira ticket: HDS-4770
👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.