Skip to content

Commit

Permalink
Cleanup TODO notes, remove old preview args from build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
danielperano committed Jun 21, 2024
1 parent 065ae75 commit 2e30105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,18 @@ java {
}
}

tasks.withType(JavaCompile).configureEach {
//options.compilerArgs.add('--enable-preview')
}

tasks.withType(Test).configureEach {
//jvmArgs += '--enable-preview'
jvmArgs += '--enable-native-access=ALL-UNNAMED'
}

compileTestGroovy {
//options.compilerArgs.add('--enable-preview')
options.compilerArgs.add('--enable-native-access=ALL-UNNAMED')
}

test {
useJUnitPlatform()
// TODO - support non-Linux lib names
systemProperty "buoy.test.lib.path", new File(parent.projectDir.absoluteFile, "native/build/lib/main/debug/").toPath().toString()
jvmArgs(['--enable-native-access=ALL-UNNAMED'])
//jvmArgs(['--enable-preview', '--enable-native-access=ALL-UNNAMED'])
}

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public FieldHandler(FieldDef model, Field field){
this.field = field;
}

// TODO - this doesn't work if this field references a struct value, since structs
// Note that this doesn't work if this field references a struct value, since structs
// are not value layouts in Panama and the VarHandle can only access a value layout.
// To access nested structs, use a struct model class.
public VarHandle getHandle(MemoryLayout layout){
var handle = layout.varHandle(MemoryLayout.PathElement.groupElement(model.name()));
return MethodHandles.insertCoordinates(handle, 1, 0L);
Expand Down

0 comments on commit 2e30105

Please sign in to comment.