-
Notifications
You must be signed in to change notification settings - Fork 28
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
Multiplatform worfklow with windows fix #149
Multiplatform worfklow with windows fix #149
Conversation
it.absolutePath | ||
.removePrefix(prefix) | ||
.removePrefix(File.separator) | ||
.replace(File.separator, "/") to it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked about this on the other PR too, but this seems counterintuitive to me. Isn't the "/" character the problematic one? If so, why are we adding it back manually here? Or is it because this is a zip and we need to force it to always use "/" regardless of the source OS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the latter I believe - because it's a zip
Though, I haven't tested it, I could play around with different versions of it to see conclusively but not today
The testing around this is ace now though - that was a bear!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait, found it. zip specification
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
item 4.4.17.1
4.4.17 file name: (Variable)
4.4.17.1 The name of the file, with optional relative path.
The path stored MUST NOT contain a drive or
device letter, or a leading slash. All slashes
MUST be forward slashes '/' as opposed to
backwards slashes '\' for compatibility with Amiga
and UNIX file systems etc. If input came from standard
input, there is no file name field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ZacSweers any code that causes persistent doubts yet is based on a specification deserves a good comment, so this morning as I got moving again I took that specification chunk and sprinkled it as comments with specification reference in that code. Future maintainers will hopefully rejoice
9d0b8b2
to
850db0a
Compare
on ubuntu-latest you must have /dev/kvm permissions for the runner user in order for hardware acceleration in the emulator to work
850db0a
to
0e5fa76
Compare
Oh no!
This is similar to what I battled through while working on it, where I discovered that the gradle toolchain didn't work. But I got it working in the CI actions on my fork and I also reproduced it locally and fixed it locally Note to myself as I'll probably look at this later when I'm more tired: Running the plugin test with Very strange it worked on my fork but failed here though. Sorry for the hassle, thought it was good to go |
0e5fa76
to
42bf43b
Compare
Easier than I thought, was a bad rebase as I added the zip spec comments, accidentally dropped the test fixes that were already reviewed and good 🤦. Also did a Re-added, re-pushed, CI running again here https://github.com/mikehardy/keeper/actions/runs/9704804942 --> ✅ Doesn't seem to want to auto-run here but it should go all-green again after the rebase fixup |
42bf43b
to
300e123
Compare
Thanks! |
That PR was harder than expected! First time I've ever worked on a gradle plugin, unexpectedly difficult to test but the test rig here is really good - it's just a tough chunk of the ecosystem to work on. Anyway, happy to help, keeper allowed us to test our app in release mode and we (where "we" is really @voczi :-) ) shrank our app from 43MB to 35MB and we've got a 3.5million devices that are going to be happy with that Cheers |
Awesome! I'll try to cut a release today |
This PR should supercede both of these:
I developed this on my fork with the patch from @voczi from #147 as a starting point, picked into a branch where I worked on the workflow.
I made a PR into my fork's main branch to run CI (over and over and over) until I was sure I had it working
Test run showing success: https://github.com/mikehardy/keeper/actions/runs/9686107630
There is nothing fancy about the windows fix itself, it's standard
Path.separator()
andSystem.lineSeparator()
stuff - exactly as you would expectThere are two fancy things about the workflow / test fixes:
End result of all the work is that keeper will run on windows, will be verified working on windows in CI, and as a bonus you'll have your emulator tests hardware accelerated
Cheers