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

Support most native targets #538

Closed
wants to merge 0 commits into from
Closed

Conversation

krzema12
Copy link
Contributor

@krzema12 krzema12 commented Apr 3, 2024

Part of #232.

  • request building extra targets in Gradle config
  • configure CI to run tests for the native targets (currently we get e.g. > Task :compileKotlinIosArm64 SKIPPED, we need to add jobs running on Mac OS and Windows runners)
  • configure build logic to publish the library in such a way that all targets are built (probably just running form Mac OS)

build.gradle.kts Outdated
iosX64()

// Tier 2
// linuxX64() // Commenting it out for a moment because its tests fail, and I cannot reproduce it locally.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aSemy this target seems to be special, the tests fail for it: https://github.com/charleskorn/kaml/actions/runs/8534050619/job/23377766881. Do you have any intuition why? I cannot reproduce it locally. My next idea is to configure Gradle build scans so that we see the whole stack trace.

Copy link
Contributor

@aSemy aSemy Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, here are the test errors:

YamlScalarTest.a YAML scalar.when reading invalid floating point values.given a scalar with the content '1e-'.retrieving the value as a float.throws an appropriate exception[linuxX64] FAILED
    kotlin.AssertionError at null:-1

YamlScalarTest.a YAML scalar.when reading invalid floating point values.given a scalar with the content '1e-'.retrieving the value as a double.throws an appropriate exception[linuxX64] FAILED
    kotlin.AssertionError at null:-1

YamlScalarTest.a YAML scalar.when reading invalid floating point values.given a scalar with the content '1e+'.retrieving the value as a float.throws an appropriate exception[linuxX64] FAILED
    kotlin.AssertionError at null:-1

YamlScalarTest.a YAML scalar.when reading invalid floating point values.given a scalar with the content '1e+'.retrieving the value as a double.throws an appropriate exception[linuxX64] FAILED
    kotlin.AssertionError at null:-1

547 tests completed, 4 failed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And these are the tests

context("retrieving the value as a float") {
it("throws an appropriate exception") {
val exception = shouldThrow<YamlScalarFormatException> { scalar.toFloat() }
exception.asClue {
it.message shouldBe "Value '$content' is not a valid floating point value."
it.line shouldBe 2
it.column shouldBe 4
it.path shouldBe path
it.originalValue shouldBe content
}
}
}

context("retrieving the value as a double") {
it("throws an appropriate exception") {
val exception = shouldThrow<YamlScalarFormatException> { scalar.toDouble() }
exception.asClue {
it.message shouldBe "Value '$content' is not a valid floating point value."
it.line shouldBe 2
it.column shouldBe 4
it.path shouldBe path
it.originalValue shouldBe content
}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next step: check what part of the assertion fails. "kotlin.AssertionError at null:-1" looks weird.

Copy link

stale bot commented Jun 3, 2024

This issue has been automatically marked as stale because it has not had any activity in the last 60 days. It will automatically be closed if no further activity occurs in the next seven days to enable maintainers to focus on the most important issues.
If this issue is still affecting you, please comment below within the next seven days.
Thank you for your contributions.

@stale stale bot added the stale label Jun 3, 2024
@krzema12
Copy link
Contributor Author

krzema12 commented Jun 4, 2024

It's still work in progress, and waiting until I - or someone else?) pick(s) this up.

@krzema12
Copy link
Contributor Author

krzema12 commented Jun 7, 2024

Oops, got closed by accident when I synced my fork with upstream! The diff disappeared as well... Fortunately, all that was done there was enabling building extra targets, as the PR description says.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants