comunica / comunica-feature-reasoning

📬 Comunica packages for reasoning during query execution
MIT License
5 stars 5 forks source link

Dev notes #50

Open jeswr opened 2 years ago

jeswr commented 2 years ago

Issue type:


Description:

Should probably port this over to componentsjs at some point where the error messages can be fixed but at the moment a few things to note

For an error like the following, add jsdoc to the bus, namely

ErrorResourcesContext: The value "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-rule/^1.0.0/components/ActorOptimizeRule.jsonld#ActorOptimizeRule_default_bus" for parameter "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/mediator-combine-pipeline/^2.0.0/components/MediatorCombinePipeline.jsonld#MediatorCombinePipeline_args_bus" is not of required range type "(https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Bus.jsonld#Bus)<UNKNOWN GENERIC: https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Mediator.jsonld#Mediator__generic_A, UNKNOWN GENERIC: https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Mediator.jsonld#Mediator__generic_I, UNKNOWN GENERIC: https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Mediator.jsonld#Mediator__generic_T, UNKNOWN GENERIC: https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Mediator.jsonld#Mediator__generic_O>"
    at Function.throwIncorrectTypeError (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.js:366:15)
    at ParameterPropertyHandlerRange.captureType (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.js:37:39)
    at ParameterPropertyHandlerRange.handle (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/parameterproperty/ParameterPropertyHandlerRange.js:19:14)
    at ParameterHandler.applyParameterValues (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/ParameterHandler.js:52:33)
    at ConfigPreprocessorComponentMapped.getParameterValue (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponentMapped.js:56:18)
    at ConstructorArgumentsElementMappingHandlerKeyValue.handleKeyValue (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerKeyValue.js:30:30)
    at ConstructorArgumentsElementMappingHandlerKeyValue.handle (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerKeyValue.js:24:25)
    at ConfigPreprocessorComponentMapped.applyConstructorArgumentsParameters (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponentMapped.js:43:32)
    at ConstructorArgumentsElementMappingHandlerFields.handle (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/constructorargumentsmapping/ConstructorArgumentsElementMappingHandlerFields.js:24:18)
    at ConfigPreprocessorComponentMapped.applyConstructorArgumentsParameters (/home/jeswr/comunica-latest/comunica/node_modules/componentsjs/lib/preprocess/ConfigPreprocessorComponentMapped.js:43:32)
error Command failed with exit code 1.
/**
   * @param args - @defaultNested {<default_bus> a <cc:components/Bus.jsonld#Bus>} bus
   */
github-actions[bot] commented 2 years ago

Thanks for the suggestion!

jeswr commented 2 years ago

Other common issues with generation

export abstract class ActorRdfUpdateQuadsIntercept extends Actor<IActionRdfUpdateQuadsIntercept, IActorTest, IActorRdfUpdateQuadsInterceptOutput> {

works but

export abstract class ActorRdfUpdateQuadsIntercept extends ActorRdfUpdateQuads

does not - similarly with args