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

update BCV to 0.15.0 #44

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5fa768d
update bcv to 0.14.0
aSemy Jan 29, 2024
4d4ba27
- update tests
aSemy Feb 15, 2024
c68833a
minor format log message
aSemy Feb 19, 2024
832ad11
wip implementation of bcv 0.15, supporting klibs
aSemy Apr 15, 2024
4d21585
wip
aSemy May 31, 2024
5f1ce30
Merge branch 'refs/heads/main' into update/bcv-0.15.0
aSemy May 31, 2024
9b395b7
add assign util fn for `Property<KLibSignatureVersion>`
aSemy May 31, 2024
d461fb7
add util for assigning klib.signatureVersion
aSemy May 31, 2024
c7dfe2d
fix signatureVersion convention for targets
aSemy May 31, 2024
9393e69
update test util message when no tasks are found
aSemy May 31, 2024
f076934
fixing integration tests...
aSemy May 31, 2024
50d9c56
filter out KLib targets where the klib doesn't exist
aSemy May 31, 2024
7dc0753
add BCVInternalApi to supportedByCurrentHost (should only be used in …
aSemy May 31, 2024
64846ec
add Kotlin version to generated BCVProperties
aSemy May 31, 2024
a561c21
configure klib defaults
aSemy May 31, 2024
5b8234c
update method of disabling KLib targets in tests
aSemy May 31, 2024
49c79ab
tidy log
aSemy May 31, 2024
d2fdd97
fixes
aSemy May 31, 2024
37762e1
tidy kdoc
aSemy Jun 1, 2024
899de2e
prep for klib extract
aSemy Jun 1, 2024
4f2a73f
NFC: extend top-level decls test case
aSemy Jun 1, 2024
049044a
don't cache dump task if api dir is invalid
aSemy Jun 2, 2024
f7bd2da
tidying...
aSemy Jun 2, 2024
1cdbcc0
enable build cache by default in tests (so they are faster!)
aSemy Jun 2, 2024
cd51900
rm old assertion
aSemy Jun 2, 2024
402a3f4
update dump
aSemy Jun 2, 2024
eb6c795
sort BCVTargets
aSemy Jun 2, 2024
0095fff
set gradle properties using `gradle.properties`, add `--parallel`
aSemy Jun 2, 2024
3056ff4
use stable temp dir for test projects
aSemy Jun 2, 2024
64298ad
bump memory for Apple targets test
aSemy Jun 2, 2024
878bfb8
fix test assertion to permit caching
aSemy Jun 2, 2024
04fb1d8
tidy logging/docs
aSemy Jun 2, 2024
7d5c4ca
change strict klib validation so it's not configurable per target, bu…
aSemy Jun 2, 2024
d994595
wip trying to get klib validation working for supported/unsupported t…
aSemy Jun 2, 2024
1c83c1f
fix adding gradle.properties to test projects
aSemy Jun 2, 2024
bf11bb7
mostly working... just a few failing klibs
aSemy Jul 15, 2024
745fc9d
update bcv to 0.15.1
aSemy Jul 15, 2024
ebd183c
tidy
aSemy Jul 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tidy logging/docs
aSemy committed Jun 2, 2024
commit 04fb1d882b31a14d470fda3c1faf4736dbcb16db
Original file line number Diff line number Diff line change
@@ -165,7 +165,7 @@ constructor(
project.tasks.withType<BCVDefaultTask>().configureEach {
bcvEnabled.convention(extension.enabled)

onlyIf("BCV is disabled") { bcvEnabled.get() }
onlyIf("BCV is enabled") { bcvEnabled.get() }
}

project.tasks.withType<BCVApiGeneratePreparationTask>().configureEach {
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@ constructor(
|
|$diffText
|
|You can run '$apiDumpTaskPath' task to overwrite API declarations
|You can run '$apiDumpTaskPath' task to overwrite API declarations.
""".trimMargin()
)
}
Original file line number Diff line number Diff line change
@@ -17,6 +17,21 @@ import org.gradle.api.provider.Property
import org.gradle.workers.WorkAction
import org.gradle.workers.WorkParameters

/**
* Infers a possible KLib ABI dump for an unsupported target.
*
* To infer a dump, walk up the default targets hierarchy tree starting from the unsupported
* target until it finds a node corresponding to a group containing least one supported target.
*
* After that, dumps generated for such supported targets are merged and declarations that are
* common to all of them are considered as a common ABI that most likely will be shared by the
* unsupported target.
*
* At the next step, if a project contains an old dump, declarations specific to the unsupported
* target are copied from it and merged into the common ABI extracted previously.
*
* The resulting dump is then used as an inferred dump for the unsupported target.
*/
@BCVInternalApi
@BCVExperimentalApi
@OptIn(ExperimentalBCVApi::class)
@@ -38,6 +53,8 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
val taskPath: Property<String>
}

private val taskPath: String = parameters.taskPath.get()

override fun execute() {
// Find a set of supported targets that are closer to unsupported target in the hierarchy.
// Note that dumps are stored using configurable name, but grouped by the canonical target name.
@@ -60,7 +77,7 @@ abstract class KLibInferSignaturesWorker : WorkAction<KLibInferSignaturesWorker.
}
if (extantImage == null) {
logger.warn(
"Project's ABI file exists, but empty: ${extantApiDumpFile}. " +
"[$taskPath] Project's ABI file exists, but empty: ${extantApiDumpFile}. " +
"The file will be ignored during ABI dump inference for the unsupported target "
// + target.get()
)