Skip to content

Conversation

surilindur
Copy link
Contributor

@surilindur surilindur commented Apr 18, 2025

This is a small change to update to the latest versions of the generation-related dependencies.

This also adds a resolutions field for componentsjs, because version 5.x causes context lookup errors when serving the dataset. The CSS uses componentsjs 5.x, as well as Comunica 2.x (according to yarn.lock) that also uses componentsjs 5.x.

@coveralls
Copy link

coveralls commented Apr 18, 2025

Pull Request Test Coverage Report for Build 14534322527

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 14530655134: 0.0%
Covered Lines: 112
Relevant Lines: 112

💛 - Coveralls

@rubensworks
Copy link
Collaborator

Note that resolutions will only work when this package is installed (in-dev) using yarn.
So this may cause problems when people will install the released package from npm.

Are you sure the resolution is needed? Can't the invalid context lookups be avoided in another way?

@surilindur
Copy link
Contributor Author

I hope it can be avoided in another way. The issue seems to be that, when CSS is started, it uses componentsjs to run itself, but for some reason that process ends up scanning the node_modules of SolidBench, instead of sticking to the directory of the CSS in node_modules/@solid/community-server. And because it uses componentsjs version 5.x then it tries to do remote lookups for componentsjs version 6.x context URIs for the dependencies of SolidBench, even though it should not.

I tried to change the mainModulePath in lib/Server.js (passed to AppRunner from CSS) to ensure it starts from the CSS folder, but it does not appear to be changing anything, and I am not sure why.

@surilindur
Copy link
Contributor Author

surilindur commented Apr 18, 2025

These are the warnings it prints first (a lot of them, for all dependencies that use componentsjs 6):

2025-04-18T10:05:06.671Z [Components.js] warn: Detected remote context lookup for 'https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld' in <snip>/SolidBench.js/node_modules/ldbc-snb-enhancer/components/components.jsonld. This may indicate a missing or invalid dependency, incorrect version number, or an invalid context URL.

Then it crashes with this error:

Error: Could not build the config files from <snip>/SolidBench.js/templates/server-config.json
Error: Error while parsing file "<snip>/SolidBench.js/node_modules/rdf-dataset-fragmenter/components/components.jsonld": Failed to load remote context https://linkedsoftwaredependencies.org/bundles/npm/componentsjs/^6.0.0/components/context.jsonld: Bad Gateway
    at RdfParser.addPathToError (<snip>/SolidBench.js/node_modules/@solid/community-server/node_modules/componentsjs/lib/rdf/RdfParser.js:85:16)
    at PassThrough.<anonymous> (<snip>/SolidBench.js/node_modules/@solid/community-server/node_modules/componentsjs/lib/rdf/RdfParser.js:58:38)
    at PassThrough.emit (node:events:519:35)
    at JsonLdParser.<anonymous> (<snip>/SolidBench.js/node_modules/rdf-parse/lib/RdfParser.js:60:47)
    at JsonLdParser.emit (node:events:519:35)
    at emitErrorNT (<snip>/SolidBench.js/node_modules/readable-stream/lib/internal/streams/destroy.js:126:8)
    at emitErrorCloseNT (<snip>/SolidBench.js/node_modules/readable-stream/lib/internal/streams/destroy.js:98:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

    at AppRunner.resolveError (<snip>/SolidBench.js/node_modules/@solid/community-server/dist/init/AppRunner.js:248:15)
    at AppRunner.create (<snip>/SolidBench.js/node_modules/@solid/community-server/dist/init/AppRunner.js:63:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async AppRunner.run (<snip>/SolidBench.js/node_modules/@solid/community-server/dist/init/AppRunner.js:38:21)

@surilindur surilindur force-pushed the chore/dependency-updates branch from 293b728 to 0a99996 Compare April 18, 2025 11:17
@surilindur
Copy link
Contributor Author

Serving the dataset works again without the resolutions field, since the Linked Software Dependencies server is back up. 🥳 This is now ready for review.

@rubensworks rubensworks merged commit 0f9946f into SolidBench:master Apr 18, 2025
5 checks passed
@surilindur surilindur deleted the chore/dependency-updates branch April 18, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants