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

Generator always fails to find config file on Windows #724

Open
jakepetroules opened this issue Feb 1, 2025 · 2 comments
Open

Generator always fails to find config file on Windows #724

jakepetroules opened this issue Feb 1, 2025 · 2 comments
Labels
kind/bug Feature doesn't work as expected. status/triage Collecting information required to triage the issue.

Comments

@jakepetroules
Copy link
Member

jakepetroules commented Feb 1, 2025

Description

This is due to the code in PluginUtils.swift which uses $0.path.lastComponent to get the filename of files in a FileList (which is SwiftPM package plugin API).

Unfortunately, path.lastComponent is broken on Windows, but there is a functional replacement url.lastComponent in manifest versions 6.0 or later.

When can swift-openapi-generator adopt 6.0 manifest version, or what can we do to resolve this on Windows?

@jakepetroules jakepetroules added kind/bug Feature doesn't work as expected. status/triage Collecting information required to triage the issue. labels Feb 1, 2025
@czechboy0
Copy link
Contributor

We'll be able to bump the tools version to 6.0 when 6.2 ships, to continue our support window of 3 released Swift versions.

To add Windows support, we'll probably first need to enable Windows CI as a non-required check, and incrementally work through any issues (like this one) to get it to green.

Happy for you to open that PR first if you'd like.

@jakepetroules
Copy link
Member Author

I filed #736 for the CI part, but I don't know how to enable that. Happy to come back to this with a PR to fix the build issues once 6.2 comes out (feel free to remind me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Feature doesn't work as expected. status/triage Collecting information required to triage the issue.
Projects
None yet
Development

No branches or pull requests

2 participants