Skip to content

[fix] symlink routes #6796

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

Merged
merged 9 commits into from
Sep 20, 2022
Merged

[fix] symlink routes #6796

merged 9 commits into from
Sep 20, 2022

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Sep 14, 2022

Fixes #6303

No test because I don't know how to write one for this. @oneezy could you test out if this fixes the issue for you?

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Sep 14, 2022

🦋 Changeset detected

Latest commit: 7de8a8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Conduitry
Copy link
Member

You should be able to just create a relative symlink in some test's routes directory and then check it in with Git.

@oneezy
Copy link

oneezy commented Sep 14, 2022

Thanks @dummdidumm !
Just tested and LGTM!

Here's a quick video showing the fix in action

symlink-routes-fix.webm

Copy link

@oneezy oneezy left a comment

Choose a reason for hiding this comment

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

LGTM!

@benmccann
Copy link
Member

I've rerun the tests a few times and they keep failing. I think this one is a real test failure

@dummdidumm
Copy link
Member Author

Apparently I have a magic laptop, it passed now after rerunning again.

@oneezy
Copy link

oneezy commented Sep 14, 2022

Windows issue maybe? Going back to the original PR fix, here's a screenshot of the conversation had around tests

image

@Rich-Harris
Copy link
Member

Added a test. Unfortunately it's failing for me when the app is built, even though it's fine in dev. Looking

Copy link
Member Author

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

I see vite_manifest being used in several other places. Do they need the same treatment?

@Rich-Harris
Copy link
Member

good catch, applied the same logic to endpoints. i think that covers everything

@Conduitry
Copy link
Member

To report back here about the Windows stuff: I checked out this branch on Windows 10, manually created the symlink, and ran tests, and the new symlink test passed for me. So I think we're safe to skip that one on Windows (maybe just during CI?) if it's causing problems for us.

@Conduitry
Copy link
Member

Do we want to just go back to directly checking the symlink into the repo if we're going to be skipping the test on Windows anyway?

@Rich-Harris
Copy link
Member

Windows isn't failing that one test, it's failing to start the dev server altogether. 7de8a8a is to see if the problem was having/creating the symlink in the first place (though I don't know why the error would be so vague)

@Rich-Harris
Copy link
Member

finally

@Rich-Harris Rich-Harris merged commit 5a54eb4 into master Sep 20, 2022
@Rich-Harris Rich-Harris deleted the fix-symlink-bug branch September 20, 2022 14:48
@oneezy
Copy link

oneezy commented Sep 21, 2022

❤️❤️❤️

Thanks a ton crew' SveltaLowda

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.

🐛 Symlink routes no longer work (1.0.0-next.432 — PR #6174)
5 participants