Skip to content

Commit

Permalink
#2 fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalSmile committed Jul 8, 2024
1 parent 51ab43b commit c7445a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ jobs:
- name: Build Gradle
run: |
./gradlew build -DheaderVersion=$headerVersion
- name: test
if: always()
run: ls -lah /tmp/libclang.so-*
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Java Native Memory Processing
![](https://img.shields.io/badge/Java-22+-success)
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation?color=blue&link=https%3A%2F%2Fcentral.sonatype.com%2Fartifact%2Fio.github.digitalsmile.native%2Fannotation)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/digitalsmile/annotation/gradle.yml)
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation?label=annotation)
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.digitalsmile.native/annotation-processor?label=annotation-processor)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/digitalsmile/native-memory-processor/gradle.yml)
## Introduction
With the release of JDK 22 the new Foreign Function & Memory API (FFM API) has been introduced from preview phase.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
processFunctions(rootElement, functionElements, packageName);

} catch (Throwable e) {
e.printStackTrace();
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage());
}
}
Expand Down Expand Up @@ -158,13 +157,10 @@ private void processHeaderFiles(Element element, String[] headerFiles, String pa
var parsed = JextractTool.parse(Path.of(header.toFile().getAbsolutePath()), includes);
allParsedHeaders.put(header, parsed);
} catch (ExceptionInInitializerError | ClangException | TypeLayoutError | Index.ParsingFailedException e) {
e.printStackTrace();
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getCause().getMessage());
return;
}
}
// /tmp/libclang.so-5383561861285695138
// /tmp/libclang.so-5383561861285695138
var parser = new Parser(processingEnv.getMessager());
try {
var parsed = parser.parse(structs, enums, unions, allParsedHeaders);
Expand All @@ -179,7 +175,6 @@ private void processHeaderFiles(Element element, String[] headerFiles, String pa
}
}
} catch (Throwable e) {
e.printStackTrace();
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage());
}
}
Expand Down Expand Up @@ -280,7 +275,6 @@ private List<Path> getHeaderPaths(String[] headerFiles) {

rootPath = rootDirectory.toPath();
} catch (IOException e) {
e.printStackTrace();
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Cannot create tmp resource " + e);
continue;
}
Expand Down Expand Up @@ -311,7 +305,6 @@ private void createGeneratedFile(String packageName, String fileName, String con
writer.write(contents);
writer.close();
} catch (IOException e) {
e.printStackTrace();
processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Exception occurred while processing file '" + fileName + "': " + e.getMessage());
}
}
Expand Down

0 comments on commit c7445a5

Please sign in to comment.