Skip to content

Commit a5a3b8c

Browse files
authored
merge main into develop (#5237)
2 parents 9ac564f + c88571f commit a5a3b8c

18 files changed

Lines changed: 591 additions & 33 deletions

File tree

.github/workflows/hugo.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
# Default to bash
25+
defaults:
26+
run:
27+
shell: bash
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
env:
34+
HUGO_VERSION: 0.128.0
35+
steps:
36+
- name: Install Hugo CLI
37+
run: |
38+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
39+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
40+
- name: Install Dart Sass
41+
run: sudo snap install dart-sass
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
with:
45+
submodules: recursive
46+
- name: Setup Pages
47+
id: pages
48+
uses: actions/configure-pages@v5
49+
- name: Install Node.js dependencies
50+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
51+
- name: Build with Hugo
52+
env:
53+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
54+
HUGO_ENVIRONMENT: production
55+
run: |
56+
hugo --source site \
57+
--minify \
58+
--baseURL "${{ steps.pages.outputs.base_url }}/"
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: ./site/public
63+
64+
# Deployment job
65+
deploy:
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
69+
runs-on: ubuntu-latest
70+
needs: build
71+
steps:
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4

bom/pom.xml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,13 @@
413413
<dependency>
414414
<groupId>org.lwjgl</groupId>
415415
<artifactId>lwjgl-lmdb</artifactId>
416-
<classifier>natives-macos-arm64</classifier>
416+
<classifier>natives-linux-arm64</classifier>
417+
<version>${lwjgl.version}</version>
418+
</dependency>
419+
<dependency>
420+
<groupId>org.lwjgl</groupId>
421+
<artifactId>lwjgl-lmdb</artifactId>
422+
<classifier>natives-linux-ppc64le</classifier>
417423
<version>${lwjgl.version}</version>
418424
</dependency>
419425
<dependency>
@@ -422,18 +428,42 @@
422428
<classifier>natives-macos</classifier>
423429
<version>${lwjgl.version}</version>
424430
</dependency>
431+
<dependency>
432+
<groupId>org.lwjgl</groupId>
433+
<artifactId>lwjgl-lmdb</artifactId>
434+
<classifier>natives-macos-arm64</classifier>
435+
<version>${lwjgl.version}</version>
436+
</dependency>
425437
<dependency>
426438
<groupId>org.lwjgl</groupId>
427439
<artifactId>lwjgl-lmdb</artifactId>
428440
<classifier>natives-windows</classifier>
429441
<version>${lwjgl.version}</version>
430442
</dependency>
443+
<dependency>
444+
<groupId>org.lwjgl</groupId>
445+
<artifactId>lwjgl-lmdb</artifactId>
446+
<classifier>natives-windows-arm64</classifier>
447+
<version>${lwjgl.version}</version>
448+
</dependency>
431449
<dependency>
432450
<groupId>org.lwjgl</groupId>
433451
<artifactId>lwjgl</artifactId>
434452
<classifier>natives-linux</classifier>
435453
<version>${lwjgl.version}</version>
436454
</dependency>
455+
<dependency>
456+
<groupId>org.lwjgl</groupId>
457+
<artifactId>lwjgl</artifactId>
458+
<classifier>natives-linux-arm64</classifier>
459+
<version>${lwjgl.version}</version>
460+
</dependency>
461+
<dependency>
462+
<groupId>org.lwjgl</groupId>
463+
<artifactId>lwjgl</artifactId>
464+
<classifier>natives-linux-ppc64le</classifier>
465+
<version>${lwjgl.version}</version>
466+
</dependency>
437467
<dependency>
438468
<groupId>org.lwjgl</groupId>
439469
<artifactId>lwjgl</artifactId>
@@ -452,6 +482,12 @@
452482
<classifier>natives-windows</classifier>
453483
<version>${lwjgl.version}</version>
454484
</dependency>
485+
<dependency>
486+
<groupId>org.lwjgl</groupId>
487+
<artifactId>lwjgl</artifactId>
488+
<classifier>natives-windows-arm64</classifier>
489+
<version>${lwjgl.version}</version>
490+
</dependency>
455491
</dependencies>
456492
</dependencyManagement>
457493
</project>

core/queryalgebra/evaluation/src/main/java/org/eclipse/rdf4j/query/algebra/evaluation/impl/evaluationsteps/RegexValueEvaluationStepSupplier.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public class RegexValueEvaluationStepSupplier {
3838
private static final class ChangingRegexQueryValueEvaluationStep implements QueryValueEvaluationStep {
3939
private final Regex node;
4040
private final EvaluationStrategy strategy;
41+
private Value parg;
42+
private Value farg;
43+
private Pattern pattern;
4144

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

5760
if (QueryEvaluationUtility.isStringLiteral(arg) && QueryEvaluationUtility.isSimpleLiteral(parg)
5861
&& (farg == null || QueryEvaluationUtility.isSimpleLiteral(farg))) {
62+
63+
Pattern pattern = getPattern((Literal) parg, farg);
64+
5965
String text = ((Literal) arg).getLabel();
60-
String ptn = ((Literal) parg).getLabel();
61-
// TODO should this Pattern be cached?
62-
int f = extractRegexFlags(farg);
63-
Pattern pattern = Pattern.compile(ptn, f);
6466
boolean result = pattern.matcher(text).find();
6567
return BooleanLiteral.valueOf(result);
6668
}
6769
throw new ValueExprEvaluationException();
6870
}
71+
72+
private Pattern getPattern(Literal parg, Value farg) {
73+
if (this.parg == parg && this.farg == farg) {
74+
return pattern;
75+
}
76+
77+
String ptn = parg.getLabel();
78+
int f = extractRegexFlags(farg);
79+
Pattern pattern = Pattern.compile(ptn, f);
80+
81+
// cache the pattern object and the current parg and farg so that we can reuse it if the parg and farg are
82+
// reused or somehow constant
83+
this.parg = parg;
84+
this.farg = farg;
85+
this.pattern = pattern;
86+
87+
return pattern;
88+
}
6989
}
7090

7191
public static QueryValueEvaluationStep make(EvaluationStrategy strategy, Regex node,

core/repository/sail/src/main/java/org/eclipse/rdf4j/repository/sail/helpers/SailUpdateExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ protected void executeModify(Modify modify, UpdateContext uc, int maxExecutionTi
447447
whereClause, uc, maxExecutionTime)) {
448448
while (sourceBindings.hasNext()) {
449449
BindingSet sourceBinding = sourceBindings.next();
450-
deleteBoundTriples(sourceBinding, modify.getDeleteExpr(), uc);
451450

451+
deleteBoundTriples(sourceBinding, modify.getDeleteExpr(), uc);
452452
insertBoundTriples(sourceBinding, modify.getInsertExpr(), uc);
453453
}
454454
}

core/sail/base/src/main/java/org/eclipse/rdf4j/sail/base/Changeset.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.stream.Collectors;
3030
import java.util.stream.Stream;
3131

32+
import org.eclipse.rdf4j.common.annotation.Experimental;
3233
import org.eclipse.rdf4j.common.annotation.InternalUseOnly;
3334
import org.eclipse.rdf4j.common.transaction.IsolationLevels;
3435
import org.eclipse.rdf4j.model.IRI;
@@ -175,7 +176,8 @@ boolean hasApproved(Resource subj, IRI pred, Value obj, Resource[] contexts) {
175176
}
176177
}
177178

178-
boolean hasDeprecated(Resource subj, IRI pred, Value obj, Resource[] contexts) {
179+
@Experimental
180+
public boolean hasDeprecated(Resource subj, IRI pred, Value obj, Resource[] contexts) {
179181
assert !closed;
180182
if ((deprecated == null || deprecatedEmpty) && deprecatedContexts == null) {
181183
return false;

core/sail/base/src/main/java/org/eclipse/rdf4j/sail/base/SailSourceConnection.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,13 @@ private void add(Resource subj, IRI pred, Value obj, SailDataset dataset, SailSi
763763
if (hasConnectionListeners()) {
764764
if (!hasStatement(dataset, subj, pred, obj, NULL_CTX)) {
765765
notifyStatementAdded(vf.createStatement(subj, pred, obj));
766-
sink.approve(subj, pred, obj, null);
766+
} else if (sink instanceof Changeset && ((Changeset) sink).hasDeprecated(subj, pred, obj, NULL_CTX)) {
767+
notifyStatementAdded(vf.createStatement(subj, pred, obj));
767768
}
769+
770+
// always approve the statement, even if it already exists
771+
sink.approve(subj, pred, obj, null);
772+
768773
} else {
769774
sink.approve(subj, pred, obj, null);
770775
}
@@ -784,8 +789,11 @@ private void add(Resource subj, IRI pred, Value obj, SailDataset dataset, SailSi
784789
if (hasConnectionListeners()) {
785790
if (!hasStatement(dataset, subj, pred, obj, contextsToCheck)) {
786791
notifyStatementAdded(vf.createStatement(subj, pred, obj, ctx));
787-
sink.approve(subj, pred, obj, ctx);
792+
} else if (sink instanceof Changeset
793+
&& ((Changeset) sink).hasDeprecated(subj, pred, obj, contextsToCheck)) {
794+
notifyStatementAdded(vf.createStatement(subj, pred, obj));
788795
}
796+
sink.approve(subj, pred, obj, ctx);
789797
} else {
790798
sink.approve(subj, pred, obj, ctx);
791799
}
@@ -830,7 +838,6 @@ private boolean remove(Resource subj, IRI pred, Value obj, SailDataset dataset,
830838
while (iter.hasNext()) {
831839
Statement st = iter.next();
832840
sink.deprecate(st);
833-
834841
statementsRemoved = true;
835842
notifyStatementRemoved(st);
836843
}

core/sail/extensible-store/src/main/java/org/eclipse/rdf4j/sail/extensiblestore/ReadCommittedWrapper.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,18 @@ class ReadCommittedWrapper implements DataStructureInterface {
5050

5151
@Override
5252
public void addStatement(ExtensibleStatement statement) {
53-
internalAdded.put(statement, statement);
54-
internalRemoved.remove(statement);
55-
53+
ExtensibleStatement put = internalAdded.put(statement, statement);
54+
if (put == null) {
55+
internalRemoved.remove(statement);
56+
}
5657
}
5758

5859
@Override
5960
public void removeStatement(ExtensibleStatement statement) {
60-
internalRemoved.put(statement, statement);
61+
ExtensibleStatement put = internalRemoved.put(statement, statement);
62+
if (put == null) {
63+
internalAdded.remove(statement);
64+
}
6165

6266
}
6367

core/sail/extensible-store/src/main/java/org/eclipse/rdf4j/sail/extensiblestore/valuefactory/ExtensibleStatementImpl.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import org.eclipse.rdf4j.model.IRI;
1616
import org.eclipse.rdf4j.model.Resource;
17+
import org.eclipse.rdf4j.model.Statement;
1718
import org.eclipse.rdf4j.model.Value;
1819
import org.eclipse.rdf4j.model.impl.GenericStatement;
1920

@@ -45,19 +46,17 @@ public boolean equals(Object o) {
4546
if (this == o) {
4647
return true;
4748
}
48-
if (!(o instanceof ExtensibleStatementImpl)) {
49+
if (!(o instanceof Statement)) {
4950
return false;
5051
}
52+
if (!(o instanceof ExtensibleStatement)) {
53+
return super.equals(o);
54+
}
5155
if (!super.equals(o)) {
5256
return false;
5357
}
54-
ExtensibleStatementImpl that = (ExtensibleStatementImpl) o;
55-
return inferred == that.inferred;
56-
}
57-
58-
@Override
59-
public int hashCode() {
60-
return Objects.hash(super.hashCode(), inferred);
58+
ExtensibleStatement that = (ExtensibleStatement) o;
59+
return inferred == that.isInferred();
6160
}
6261

6362
}

core/sail/lmdb/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
<version>${lwjgl.version}</version>
3030
<scope>runtime</scope>
3131
</dependency>
32+
<dependency>
33+
<groupId>org.lwjgl</groupId>
34+
<artifactId>lwjgl-lmdb</artifactId>
35+
<classifier>natives-linux-ppc64le</classifier>
36+
<version>${lwjgl.version}</version>
37+
<scope>runtime</scope>
38+
</dependency>
3239
<dependency>
3340
<groupId>org.lwjgl</groupId>
3441
<artifactId>lwjgl-lmdb</artifactId>
@@ -71,6 +78,13 @@
7178
<version>${lwjgl.version}</version>
7279
<scope>runtime</scope>
7380
</dependency>
81+
<dependency>
82+
<groupId>org.lwjgl</groupId>
83+
<artifactId>lwjgl</artifactId>
84+
<classifier>natives-linux-ppc64le</classifier>
85+
<version>${lwjgl.version}</version>
86+
<scope>runtime</scope>
87+
</dependency>
7488
<dependency>
7589
<groupId>org.lwjgl</groupId>
7690
<artifactId>lwjgl</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
<jsonldjava.version>0.13.4</jsonldjava.version>
368368
<last.japicmp.compare.version>5.0.0</last.japicmp.compare.version>
369369
<jaxb.version>2.3.8</jaxb.version>
370-
<lwjgl.version>3.3.3</lwjgl.version>
370+
<lwjgl.version>3.3.6</lwjgl.version>
371371
<lucene.version>8.9.0</lucene.version>
372372
<solr.version>8.9.0</solr.version>
373373
<elasticsearch.version>7.15.2</elasticsearch.version>

0 commit comments

Comments
 (0)