Closed nathankawalec closed 1 month ago
Thanks for the report. 99% chance it's a Windows-specific problem. Apparently file paths behave differently. I'll have to look into it.
I suspect it's because of this:
The patterns are interpreted relative to the package directory containing the source file. The path separator is a forward slash, even on Windows systems.
But then filepath.Join
uses OS-specific separators:
The filepath package uses either forward slashes or backslashes, depending on the operating system. To process paths such as URLs that always use forward slashes regardless of the operating system, see the path package.
So I think we need to update any bits in the migration embedded FS reading code to use regular path
and not filepath
, including this bit:
Yeah, seems likely that it's a windows issue. It's working fine on Ubuntu. Unfortunately, I work on Windows...
Yep, great point on filepath
. Actually it turns out that if we remove its use, the code gets considerably cleaned up anyway ... Opened #485.
I'm running into a panic when using the command:
river migrate-up --database-url postgres://host:5432/db
The stack trace is:
Using Go version: 1.22.5 Postgresql version: 16.3 Os: Windows 10 Home
I will retry on linux to see if the problem persists.