Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics issue when building in different Monrepo #90

Open
jeswr opened this issue Mar 30, 2022 · 3 comments
Open

Generics issue when building in different Monrepo #90

jeswr opened this issue Mar 30, 2022 · 3 comments
Labels

Comments

@jeswr
Copy link
Contributor

jeswr commented Mar 30, 2022

Issue type:

  • 🐛 Bug

Description:

I've got reasoning components working for Comunica V2 by copy/pasting the components to https://github.com/comunica/comunica/tree/reasoning-experiments, but whenever I try to build the components in a separate monrepo (https://github.com/comunica/comunica-feature-reasoning/tree/incremental-engine-build) I get the following trace (https://pastebin.com/mXMZSREx).

The notable error is

generic <https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Actor.jsonld#Actor__generic_I> with existing range \"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/core/^2.0.0/components/Actor.jsonld#IAction\" can not be bound to range \"urn:npm:@comunica/bus-rdf-resolve-quad-pattern:IActionRdfResolveQuadPattern\"

Environment:

Componentsjs version 5
Node v17.4.0

@github-actions
Copy link

Thanks for reporting!

@jeswr
Copy link
Contributor Author

jeswr commented Apr 2, 2022

So it looks like the solution on my end was to replace

The error changes to

Error: Resource urn:npm:@comunica/bus-rdf-resolve-quad-pattern:IActorRdfResolveQuadPatternOutput is not a valid component, either it is not defined, has no type, or is incorrectly referenced by https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-quad-pattern-intercept/^1.0.0/components/ActorRdfResolveQuadPatternIntercept.jsonld#IActorRdfResolveQuadPatternInterceptOutput.

If we replace

export type IActionRdfResolveQuadPatternIntercept = IActionRdfResolveQuadPattern;
export type IActorRdfResolveQuadPatternInterceptOutput = IActorRdfResolveQuadPatternOutput;
export type MediatorRdfResolveQuadPatternIntercept = MediatorRdfResolveQuadPattern;

with

// Revert to type = pattern once
export interface IActionRdfResolveQuadPatternIntercept extends IActionRdfResolveQuadPattern {};
export interface IActorRdfResolveQuadPatternInterceptOutput extends IActorRdfResolveQuadPatternOutput {};
export interface MediatorRdfResolveQuadPatternIntercept extends MediatorRdfResolveQuadPattern {};

Still weird that this only happens in a separate monrepo

@rubensworks
Copy link
Member

Not sure what the problem is at first glance.

The fact that you get urn:npm:@comunica/bus-rdf-resolve-quad-pattern:IActorRdfResolveQuadPatternOutput, and not a proper HTTPS URL seems to indicate that CJS doesn't find the CJS components of that package, which may indicate a dependency issue.

But it may also simply be a CJS bug in generics handling, since that stuff is pretty complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants