Skip to content

Commit

Permalink
Downgrade slf4j
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrichner-oviva committed May 17, 2024
1 parent 519ed2b commit b3640ab
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private void addUpdateMethods(TypeSpec.Builder typeRefBuilder, ObjectDefinition

for (ObjectTypeRef allowedObject : relation.allowedObjects()) {
if (allowedObject.relationship() != null) {
logger.atInfo().log(
logger.info(
"skipping update util for {}.{}#{}, can't deal with relationships on allowed objects",
definition.name(),
allowedObject.typeName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void loadParserBinary(Path parserDestination) {

var binary = "spicegen_%s".formatted(target);

logger.atInfo().log("moving pre-processor '{}' from to '{}'", binary, parserDestination);
logger.info("moving pre-processor '{}' from to '{}'", binary, parserDestination);

try (var is = this.getClass().getResourceAsStream("/" + binary);
var os =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ public Schema parse(Path schema) {

astPath = Files.createTempFile("%s_ast_".formatted(name), ".json");

logger.atInfo().log("pre-processing schema into AST from {} to {}", schema, astPath);
logger.info("pre-processing schema into AST from {} to {}", schema, astPath);
preprocessor.parse(astPath, schema);

logger.atInfo().log("loading AST from {}", astPath);
logger.info("loading AST from {}", astPath);
var root = loadAst(astPath);

logger.atDebug().log("parsing schema from AST");
logger.debug("parsing schema from AST");
var definitions =
streamNullable(root.unwrap(BaseNode.class).children())
.filter(byKind(NodeType.NodeTypeDefinition))
.map(d -> d.unwrap(DefinitionNode.class))
.map(this::mapDefinition)
.toList();

logger.atDebug().log("schema parsed");
logger.debug("schema parsed");

return new Schema(definitions);
} catch (IOException e) {
Expand Down
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
<jupiter.version>5.10.2</jupiter.version>
<mockito.jupiter.version>${mockito.version}</mockito.jupiter.version>
<mockito.version>5.11.0</mockito.version>
<org.slf4j.version>2.0.13</org.slf4j.version>
<!-- maven plugins cannot deal with slf4j 2.x -->
<org.slf4j.version>1.7.36</org.slf4j.version>
<spotbugs-annotations.version>4.8.4</spotbugs-annotations.version>
<spotless.maven.plugin.version>2.43.0</spotless.maven.plugin.version>
</properties>
Expand All @@ -93,11 +94,15 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-bom</artifactId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${org.slf4j.version}</version>
</dependency>


<dependency>
<groupId>com.oviva.spicegen</groupId>
Expand Down

0 comments on commit b3640ab

Please sign in to comment.