-
Notifications
You must be signed in to change notification settings - Fork 1
Replace resources library with okio and re-add web targets #21
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
Conversation
turf/src/commonTest/kotlin/io/github/elcolto/geokjson/turf/utils/FileSystem.kt
Outdated
Show resolved
Hide resolved
| import okio.FileSystem | ||
|
|
||
| actual val FILE_SYSTEM: FileSystem = FileSystem.SYSTEM |
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.
Regarding to the non-working ios/apple targets, I think we have to do it like here and change the path.
I can invastigate in the next days.
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.
Apparently, by now it somehow seems like the ios tests would run 🤔
Can you confirm on your system? I also used the fakeFileSystem, which allows execution of wasm targets now.
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.
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.
Further I look into finding a setup to read resources from every test target, I think it's more work when it helps 🙄
What about moving every json resource into a multiline string literal within the corresponding test. Or global values within Kotlin test directory?
I'll try to make a commit as a proposal
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.
yikes... there are big files... I may think this can lead to OOM errors sooner or later
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.
Do we want to close this PR in favor of #29. Since adding json data to kotlin files is not possible.
|
Closed PR, because JS target was added with #29 again. WASM target still to come |

Tests on ios may still fail, due to potential invalid path. We may have to take a look into that as soon as we decide whether we want to run the tests on all platforms.
The problem why the targets could not be added before was laying in the file-reading library that was used.
See goncalossilva/kotlinx-resources#101. As the issue has not been adressed yet, i swapped the library with okio. As okios wasm impl is not stable yet i left that one with a todo for now
Closes #4