diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 975a1aa..4a38cc1 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -36,6 +36,3 @@ jobs: - name: Build Gradle run: | ./gradlew build -DheaderVersion=$headerVersion - - name: test - if: always() - run: ls -lah /tmp/libclang.so-* diff --git a/README.md b/README.md index 080ed35..297af07 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/annotation-processor/src/main/java/io/github/digitalsmile/NativeProcessor.java b/annotation-processor/src/main/java/io/github/digitalsmile/NativeProcessor.java index 0902e17..2e0a316 100644 --- a/annotation-processor/src/main/java/io/github/digitalsmile/NativeProcessor.java +++ b/annotation-processor/src/main/java/io/github/digitalsmile/NativeProcessor.java @@ -93,7 +93,6 @@ public boolean process(Set annotations, RoundEnvironment processFunctions(rootElement, functionElements, packageName); } catch (Throwable e) { - e.printStackTrace(); processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, e.getMessage()); } } @@ -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); @@ -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()); } } @@ -280,7 +275,6 @@ private List getHeaderPaths(String[] headerFiles) { rootPath = rootDirectory.toPath(); } catch (IOException e) { - e.printStackTrace(); processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Cannot create tmp resource " + e); continue; } @@ -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()); } }