Skip to main content

UndeclaredModuleProvider

rascal-0.34.0

Synopsis

A scheme is used in a location for wich no provider has been registered.

Description

Locations provide very flexible ways to access files and external data sources. There any many protocols (called schemes) that can be used (e.g., file, http, home and many others). This error is generated when an unknown scheme is used.

Remedy: Use an existing scheme.

Examples

Misspelling the scheme for Rascal's standard library (which is std) gives an error when the location is used:

rascal>import IO;
ok
rascal>readFileLines(|standard:///demo/basic/Hello.rsc|);
|lib://rascal/org/rascalmpl/library/IO.rsc|(18914,781,<562,0>,<577,24>): IO("Unsupported scheme \'standard\'")
at *** somewhere ***(|lib://rascal/org/rascalmpl/library/IO.rsc|(18914,781,<562,0>,<577,24>))
at readFileLines(|lib://rascal/org/rascalmpl/library/IO.rsc|(19654,15,<576,58>,<576,73>))
ok

This is fixed by using the proper scheme name:

rascal>readFileLines(|std:///demo/basic/Hello.rsc|);
|lib://rascal/org/rascalmpl/library/IO.rsc|(18914,781,<562,0>,<577,24>): PathNotFound(|std:///demo/basic/Hello.rsc|)
at *** somewhere ***(|lib://rascal/org/rascalmpl/library/IO.rsc|(18914,781,<562,0>,<577,24>))
at readFileLines(|lib://rascal/org/rascalmpl/library/IO.rsc|(19654,15,<576,58>,<576,73>))
ok