-
Notifications
You must be signed in to change notification settings - Fork 8
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
Automatically synthesizing LinuxMain.swift
#31
Comments
Ideally generating the LinuxMain.swift shall be possible on Linux directly as it makes a huge difference during development. Though I’d prefer Swift, especially as installing pip on macOS is a pain. Generating the LinuxMain on macOS on CI and copying it over to the Linux build is not possible AFAIK. Some other ideas on this:
Regarding integrating this into different tools: |
Yes! According to my digging through SPM's source, the one and only thing that's stopping it from discovering tests automatically on Linux (and thus, the ability to generate something like the
Dang it, I was hoping there was a way, but if you say it can't be done through CI then you're probably right.
Sorry, I should've explained my idea before just posting it like that 😅 Edit: I would also first try to make it work in Python, because |
That's what I meant. I am not sure if I want swiftenv to change my projects. It can do just one thing, but it does it incredibly well. I think the best solutions are:
OT: I don't like |
That's a fair point. I think it's better to keep the functionalities separate, specially given how important is the work that
I think I'm gonna finish my python script then and we'll see where do we go from there. I plan on having a working prototype tomorrow.
Yeah, that'd be the best option long-term. I've sent a DM to Tony Parker from the corelibs team asking about how can I help. Specifically, what does one need in order to make an effective PR. Since that part of Foundation provides OS level functionality, and the My fingers itch. I want to help but I don't know how. I guess not seeing a roadmap only makes it worse 😅
Oh, nice. I'll take a look :) |
In the end, I'm going to try something more sophisticated. This is what happened:
In the end, we need something that knows about semantics. So, I've changed my focus and now I'm learning how to use SourceKitten 😅 |
I've also posted a new digging through SPM on the forums, asking for a community push on this issue. I was wrong, I think. It's not My gut feeling is that those lines are using ObjC runtime tools or something like that. But I've also given arguments about why today you can add test discovery functionality to SPM without needing anything other than Swift and SourceKit. Let's hope it works. |
This would help us run tests on projects that don't have the
LinuxMain.swift
file. How to do it, is up to us. We know that:And here are some ideas on how to do it:
LinuxMain
file, with extensions and all (I've already tried this partially and it works; it can be done).Other use cases:
swiftenv
, s.t. you can generate theLinuxMain.swift
file automatically.The text was updated successfully, but these errors were encountered: