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

feat: migrate to fileSystemRouter to be more runtime-agnostic #386

Merged
merged 23 commits into from
Aug 13, 2024

Conversation

aralroca
Copy link
Collaborator

@aralroca aralroca commented Aug 12, 2024

Fixes #304
Fixes #390
Related with #195
Related with #318

I have migrated Bun.FileSystemRouter for our own fileSystemRouter implementation. The API is the same, but there are some differences:

  • It also works in Node, it doesn't depend on Bun anymore, it was perhaps the feature of Bun that most limited using the server with Node.
  • I have taken the opportunity to fix routes that were not being managed well with Bun.FileSystemRouter and had been fixed.

As a curiosity, it is faster than Bun.FileSystemRouter 🙃

Please @AlbertSabate @adriablancafort @gariasf confirm if this 0.0.159-canary.4 canary version works for you (before merging this PR) to know that it continues to work in Windows correctly and in your environments and if everything is OK.

P.S: @leerob This change opens the door for the adapter-vercel to go beyond static.

@aralroca
Copy link
Collaborator Author

aralroca commented Aug 12, 2024

note: there was a bug in 0.0.159-canary.1, fixed in 0.0.159-canary.4, try this one better.

@aralroca aralroca force-pushed the aralroca/file-system-router branch from a14c481 to 6aabf28 Compare August 13, 2024 08:11
@gariasf
Copy link
Collaborator

gariasf commented Aug 13, 2024

@aralroca I ran bun create brisa@0.0.158, then installed the canary version. With bun 1.1.22, I open the dev server and the root page returns a 404. The document is empty, no headers, no scripts. What else do you need to debug this?

If I go back to brisa 0.0.158, it renders correctly.

By the way, I checked the hot reloading again, and I can confirm what you mentioned here. It always breaks upon the second hot-reload.

@aralroca
Copy link
Collaborator Author

@aralroca I ran bun create brisa@0.0.158, then installed the canary version. With bun 1.1.22, I open the dev server and the root page returns a 404. The document is empty, no headers, no scripts. What else do you need to debug this?

If I go back to brisa 0.0.158, it renders correctly.

By the way, I checked the hot reloading again, and I can confirm what you mentioned here. It always breaks upon the second hot-reload.

Thanks for the feedback, try canary.4, it should work now!

@danielart
Copy link
Collaborator

canary.4 is working for me.
image

@gariasf
Copy link
Collaborator

gariasf commented Aug 13, 2024

With .canary-4 the page renders correctly! Hot reloading is still not working, though.

@aralroca
Copy link
Collaborator Author

aralroca commented Aug 13, 2024

With .canary-4 the page renders correctly! Hot reloading is still not working, though.

Hot reloading in Windows is for that Bun crash issue: oven-sh/bun#13089 😣 But something else unrelated to this PR

@aralroca aralroca merged commit 8b70c98 into main Aug 13, 2024
0 of 2 checks passed
@aralroca aralroca deleted the aralroca/file-system-router branch August 13, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants