Skip to content

Commit

Permalink
merge main into develop (#5237)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad authored Jan 25, 2025
2 parents 9ac564f + c88571f commit a5a3b8c
Show file tree
Hide file tree
Showing 18 changed files with 591 additions and 33 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.128.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
run: |
hugo --source site \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site/public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 37 additions & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,13 @@
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-macos-arm64</classifier>
<classifier>natives-linux-arm64</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-linux-ppc64le</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
Expand All @@ -422,18 +428,42 @@
<classifier>natives-macos</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-macos-arm64</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-windows</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-windows-arm64</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux-arm64</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux-ppc64le</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
Expand All @@ -452,6 +482,12 @@
<classifier>natives-windows</classifier>
<version>${lwjgl.version}</version>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-windows-arm64</classifier>
<version>${lwjgl.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class RegexValueEvaluationStepSupplier {
private static final class ChangingRegexQueryValueEvaluationStep implements QueryValueEvaluationStep {
private final Regex node;
private final EvaluationStrategy strategy;
private Value parg;
private Value farg;
private Pattern pattern;

private ChangingRegexQueryValueEvaluationStep(Regex node, EvaluationStrategy strategy) {
this.node = node;
Expand All @@ -56,16 +59,33 @@ public Value evaluate(BindingSet bindings) throws QueryEvaluationException {

if (QueryEvaluationUtility.isStringLiteral(arg) && QueryEvaluationUtility.isSimpleLiteral(parg)
&& (farg == null || QueryEvaluationUtility.isSimpleLiteral(farg))) {

Pattern pattern = getPattern((Literal) parg, farg);

String text = ((Literal) arg).getLabel();
String ptn = ((Literal) parg).getLabel();
// TODO should this Pattern be cached?
int f = extractRegexFlags(farg);
Pattern pattern = Pattern.compile(ptn, f);
boolean result = pattern.matcher(text).find();
return BooleanLiteral.valueOf(result);
}
throw new ValueExprEvaluationException();
}

private Pattern getPattern(Literal parg, Value farg) {
if (this.parg == parg && this.farg == farg) {
return pattern;
}

String ptn = parg.getLabel();
int f = extractRegexFlags(farg);
Pattern pattern = Pattern.compile(ptn, f);

// cache the pattern object and the current parg and farg so that we can reuse it if the parg and farg are
// reused or somehow constant
this.parg = parg;
this.farg = farg;
this.pattern = pattern;

return pattern;
}
}

public static QueryValueEvaluationStep make(EvaluationStrategy strategy, Regex node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,8 @@ protected void executeModify(Modify modify, UpdateContext uc, int maxExecutionTi
whereClause, uc, maxExecutionTime)) {
while (sourceBindings.hasNext()) {
BindingSet sourceBinding = sourceBindings.next();
deleteBoundTriples(sourceBinding, modify.getDeleteExpr(), uc);

deleteBoundTriples(sourceBinding, modify.getDeleteExpr(), uc);
insertBoundTriples(sourceBinding, modify.getInsertExpr(), uc);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.eclipse.rdf4j.common.annotation.Experimental;
import org.eclipse.rdf4j.common.annotation.InternalUseOnly;
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
import org.eclipse.rdf4j.model.IRI;
Expand Down Expand Up @@ -175,7 +176,8 @@ boolean hasApproved(Resource subj, IRI pred, Value obj, Resource[] contexts) {
}
}

boolean hasDeprecated(Resource subj, IRI pred, Value obj, Resource[] contexts) {
@Experimental
public boolean hasDeprecated(Resource subj, IRI pred, Value obj, Resource[] contexts) {
assert !closed;
if ((deprecated == null || deprecatedEmpty) && deprecatedContexts == null) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,13 @@ private void add(Resource subj, IRI pred, Value obj, SailDataset dataset, SailSi
if (hasConnectionListeners()) {
if (!hasStatement(dataset, subj, pred, obj, NULL_CTX)) {
notifyStatementAdded(vf.createStatement(subj, pred, obj));
sink.approve(subj, pred, obj, null);
} else if (sink instanceof Changeset && ((Changeset) sink).hasDeprecated(subj, pred, obj, NULL_CTX)) {
notifyStatementAdded(vf.createStatement(subj, pred, obj));
}

// always approve the statement, even if it already exists
sink.approve(subj, pred, obj, null);

} else {
sink.approve(subj, pred, obj, null);
}
Expand All @@ -784,8 +789,11 @@ private void add(Resource subj, IRI pred, Value obj, SailDataset dataset, SailSi
if (hasConnectionListeners()) {
if (!hasStatement(dataset, subj, pred, obj, contextsToCheck)) {
notifyStatementAdded(vf.createStatement(subj, pred, obj, ctx));
sink.approve(subj, pred, obj, ctx);
} else if (sink instanceof Changeset
&& ((Changeset) sink).hasDeprecated(subj, pred, obj, contextsToCheck)) {
notifyStatementAdded(vf.createStatement(subj, pred, obj));
}
sink.approve(subj, pred, obj, ctx);
} else {
sink.approve(subj, pred, obj, ctx);
}
Expand Down Expand Up @@ -830,7 +838,6 @@ private boolean remove(Resource subj, IRI pred, Value obj, SailDataset dataset,
while (iter.hasNext()) {
Statement st = iter.next();
sink.deprecate(st);

statementsRemoved = true;
notifyStatementRemoved(st);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@ class ReadCommittedWrapper implements DataStructureInterface {

@Override
public void addStatement(ExtensibleStatement statement) {
internalAdded.put(statement, statement);
internalRemoved.remove(statement);

ExtensibleStatement put = internalAdded.put(statement, statement);
if (put == null) {
internalRemoved.remove(statement);
}
}

@Override
public void removeStatement(ExtensibleStatement statement) {
internalRemoved.put(statement, statement);
ExtensibleStatement put = internalRemoved.put(statement, statement);
if (put == null) {
internalAdded.remove(statement);
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Resource;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.Value;
import org.eclipse.rdf4j.model.impl.GenericStatement;

Expand Down Expand Up @@ -45,19 +46,17 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ExtensibleStatementImpl)) {
if (!(o instanceof Statement)) {
return false;
}
if (!(o instanceof ExtensibleStatement)) {
return super.equals(o);
}
if (!super.equals(o)) {
return false;
}
ExtensibleStatementImpl that = (ExtensibleStatementImpl) o;
return inferred == that.inferred;
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), inferred);
ExtensibleStatement that = (ExtensibleStatement) o;
return inferred == that.isInferred();
}

}
14 changes: 14 additions & 0 deletions core/sail/lmdb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
<version>${lwjgl.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
<classifier>natives-linux-ppc64le</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl-lmdb</artifactId>
Expand Down Expand Up @@ -71,6 +78,13 @@
<version>${lwjgl.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
<classifier>natives-linux-ppc64le</classifier>
<version>${lwjgl.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.lwjgl</groupId>
<artifactId>lwjgl</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
<jsonldjava.version>0.13.4</jsonldjava.version>
<last.japicmp.compare.version>5.0.0</last.japicmp.compare.version>
<jaxb.version>2.3.8</jaxb.version>
<lwjgl.version>3.3.3</lwjgl.version>
<lwjgl.version>3.3.6</lwjgl.version>
<lucene.version>8.9.0</lucene.version>
<solr.version>8.9.0</solr.version>
<elasticsearch.version>7.15.2</elasticsearch.version>
Expand Down
3 changes: 1 addition & 2 deletions site/layouts/partials/head_suffix.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
Copyright (c) 2018 Eclipse Foundation, Inc.
This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -65,5 +65,4 @@
<link rel="stylesheet" href="/css/rdf4j.css">
{{- end }}
{{- end }}
{{- partial "google_tag_manager.html" . }}
{{- partial "head_variables.html" . }}
Loading

0 comments on commit a5a3b8c

Please sign in to comment.