JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
706 stars 78 forks source link

Enable iOS build target #66

Closed ajalt closed 3 years ago

ajalt commented 3 years ago

The iOS target is currently disabled due to the fact that enabling it would cause tests to fail on CI. This is because there are a number of tests that rely on files in the test resources directory, but iOS tests run on the simulator, and don't have access to the local file system.

Here are a few of the ways we could do this:

  1. Just enable the target and accept failing CI builds. Not ideal.
  2. Move the file-based tests to jvmTest to only run them only on JVM. A couple of tests like the performance tests are already JVM-only.
  3. Create an intermediate source set like nonIosTest or desktopTest and move the file-based tests there.
  4. Remove all file-based tests currently in commonTest. Not ideal, since some of them test functionality not covered by the spec tests.
  5. Find a way to copy the test resources into the simulator before running the tests.

It would be great to publish the iOS target in the next release, so I'd love to hear your thoughts on if there's any approach you prefer.

valich commented 3 years ago

Everything was fixed by @ajalt in his PR. I've enabled ios target publishing, 0.2.3 should contain jvm, js, ios/linux/win/mac native targets