Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion waspc/src/Wasp/Node/Version.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nodeTypesVersionRangeMatchingNodeMajor nodeVersion =

isRangeInWaspSupportedRange :: SV.Range -> Bool
isRangeInWaspSupportedRange range =
SV.versionBounds range `SV.isSubintervalOf` waspVersionInterval
waspVersionInterval `SV.isSubintervalOf` SV.versionBounds range

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If isRangeInWaspSupportedRange receives a narrower supported range such as ^24.15.0, it now returns false, while ^24.0.0 returns true even though it admits unsupported versions. Reverse the arguments so the candidate range must be a subinterval of Wasp's supported interval.

Suggested change
waspVersionInterval `SV.isSubintervalOf` SV.versionBounds range
SV.versionBounds range `SV.isSubintervalOf` waspVersionInterval

where
waspVersionInterval = SV.versionBounds $ SV.backwardsCompatibleWith oldestWaspSupportedNodeVersion

Expand Down
2 changes: 1 addition & 1 deletion waspc/src/Wasp/Project/Waspignore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ getNotIgnoredRelFilePaths ::
IO [Path' (Rel d) File']
getNotIgnoredRelFilePaths waspignoreFilePath externalDirPath = do
waspignoreFile <- readWaspignoreFile waspignoreFilePath
filter (not . ignores waspignoreFile . SP.toFilePath) <$> IOUtil.listDirectoryDeep externalDirPath
filter (ignores waspignoreFile . SP.toFilePath) <$> IOUtil.listDirectoryDeep externalDirPath

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When no .waspignore pattern matches the project's normal source files, readCodeFiles now returns no application code; if a pattern does match, it includes precisely those ignored files. Negate ignores so only ignored paths are excluded.

Suggested change
filter (ignores waspignoreFile . SP.toFilePath) <$> IOUtil.listDirectoryDeep externalDirPath
filter (not . ignores waspignoreFile . SP.toFilePath) <$> IOUtil.listDirectoryDeep externalDirPath


waspIgnorePathInWaspProjectDir :: Path' (Rel WaspProjectDir) File'
waspIgnorePathInWaspProjectDir = [relfile|.waspignore|]
Expand Down
Loading