Skip to content

Add check for at least one route #2643

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

Conversation

cprecioso
Copy link
Member

@cprecioso cprecioso commented Apr 8, 2025

Description

Fixes #2447

Checks that there is at least one route declared in the AppSpec.

I had to modify a handful of tests that worked with an empty AppSpec and now must have a route decl. Please suggest if there is a better way.

Select what type of change this PR introduces:

  1. Just code/docs improvement (no functional change).
  2. Bug fix (non-breaking change which fixes an issue).
  3. New feature (non-breaking change which adds functionality).
  4. Breaking change (fix or feature that would cause existing functionality to not work as expected).

Update Waspc ChangeLog and version if needed

If you did a bug fix, new feature, or breaking change, that affects waspc, make sure you satisfy the following:

  1. I updated ChangeLog.md with description of the change this PR introduces.
  2. I bumped waspc version in waspc.cabal to reflect changes I introduced, with regards to the version of the latest wasp release, if the bump was needed.

Update example apps if needed

If you did code changes and added a new feature or modified an existing feature, make sure you satisfy the following:

  1. I updated waspc/examples/todoApp as needed (updated modified feature or added new feature) and manually checked it works correctly.
  2. I updated waspc/headless-test/examples/todoApp and its e2e tests as needed (updated modified feature and its tests or added new feature and new tests for it).

@cprecioso cprecioso requested a review from sodic April 8, 2025 13:38
@cprecioso cprecioso self-assigned this Apr 8, 2025
@cprecioso cprecioso marked this pull request as draft April 8, 2025 14:08
@cprecioso cprecioso marked this pull request as ready for review April 8, 2025 14:26
@infomiho
Copy link
Contributor

infomiho commented Apr 9, 2025

I think you did the right thing with updating unit tests the way you did 👍

@cprecioso
Copy link
Member Author

@infomiho @Martinsos care to approve? ☺️

Copy link
Contributor

@infomiho infomiho left a comment

Choose a reason for hiding this comment

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

LGTM

@cprecioso cprecioso merged commit e2d3e43 into main Apr 9, 2025
6 checks passed
@cprecioso cprecioso deleted the 2447-wasp-fails-with-an-uninformative-error-when-user-doesnt-define-any-routes branch April 9, 2025 15:41
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.

Wasp fails with an uninformative error when user doesn't define any routes
3 participants