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

fix:Update relative path in pkl-gen-go.go #3

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

kasugamirai
Copy link
Contributor

The code change fixed the incorrect relative path to the GeneratorSettings.pkl file in the pkl-gen-go.go function. An additional directory level was added to effectively locate the file.

The code change fixed the incorrect relative path to the GeneratorSettings.pkl file in the pkl-gen-go.go function. An additional directory level was added to effectively locate the file.
@himazawa
Copy link

himazawa commented Feb 5, 2024

This PR actually fixes a breaking issue.
Trying to run pkl-gen-go pkl/AppConfig.pkl --base-path [basepath] will result in:

panic: –– Pkl Error ––
Cannot find module `file:///Users/user/.go/pkg/mod/github.com/apple/pkl-go@v0.5.1/cmd/codegen/src/GeneratorSettings.pkl`.

The code was updated to use 'filepath.Dir' for handling file paths in the pkl-gen-go file. This change will improve the program's cross-platform compatibility by accurately dealing with different directory paths across multiple operating systems, thereby reducing potential problems with path separators and enhancing stability.
@bioball
Copy link
Contributor

bioball commented Feb 6, 2024

Thank you!

@bioball bioball merged commit bba3e3d into apple:main Feb 6, 2024
3 checks passed
@himazawa himazawa mentioned this pull request Feb 7, 2024
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.

None yet

3 participants