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

Fix Windows development #1205

Merged
merged 1 commit into from
May 2, 2020
Merged

Fix Windows development #1205

merged 1 commit into from
May 2, 2020

Conversation

rogermparent
Copy link
Contributor

@rogermparent rogermparent commented May 1, 2020

Ever since Models dropped, we use path.join to resolve links between files at build time (e.g. Blog Posts and Authors). I believe this is what's breaking Windows development, so I used a small module called upath that wraps the path API with cross-platform safe versions of functions like join.

upath is already installed by another module as you can see in yarn.lock, but the other package specifies an earlier version. The minimal size difference at build time and completely unchanged bundle size make it not worth pinning our usage to the same version, in my opinion.

Fixes #1204, or at least I think it does. It will before merging, at least.

@shcheklein shcheklein temporarily deployed to dvc-landing-fix-windows-pncu3u May 1, 2020 04:01 Inactive
@rogermparent rogermparent requested a review from jorgeorpinel May 1, 2020 20:39
@shcheklein
Copy link
Member

@jorgeorpinel ping?

Copy link
Contributor

@jorgeorpinel jorgeorpinel left a comment

Choose a reason for hiding this comment

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

Oh I already included this in my PR over here: #1210. It does work indeed, thanks again @rogermparent!

@rogermparent
Copy link
Contributor Author

rogermparent commented May 2, 2020

This PR is now confirmed to fix, and its commits are included in #1210
If we happen to merge this before that lands the histories should still be compatible. If not, I can pull 1210 and do the rebase.

@@ -78,7 +78,8 @@
"scroll": "^3.0.1",
"serve-handler": "^6.1.2",
"slick-carousel": "^1.8.1",
"unist-util-visit": "2.0.2"
"unist-util-visit": "2.0.2",
"upath": "^1.2.0"
Copy link
Member

Choose a reason for hiding this comment

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

not sure ... but should it be part of the devDeps section?

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 suppose it would fit more in the current setup, but technically this is the right place for it and most of those devDependencies should be moved up to regular dependencies. It makes no difference in the practical sense as the switch to YARN_PRODUCTION=false means we keep all deps and devDeps in the same way on deploy.

Copy link
Member

Choose a reason for hiding this comment

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

yep, you are right. For the website there are no difference at all, right?

may be we can keep linters, tests, and other stuff there? may be should move them to optionalDeps? to avoid installing them on Heroku?

Copy link
Member

Choose a reason for hiding this comment

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

anyway, merging this ... since this one can stay in deps.

@jorgeorpinel
Copy link
Contributor

No need to rebase Roger. I properly merged your branch to mine so Git will know what needs to be merged where/when.

@shcheklein shcheklein merged commit f0c4473 into master May 2, 2020
@jorgeorpinel jorgeorpinel deleted the fix-windows-paths branch May 5, 2020 22:38
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.

blog: can't develop/build locally on Win
3 participants