CLI - building interfaces uses a hidden, "empty" build strategy#1356
Conversation
dOrgJelli
left a comment
There was a problem hiding this comment.
I've spoken with @pileks privately about a more future proof solution to this. The TL;DR is that we need to improve the semantics around how we treat interface projects, and all projects at large, when it comes to build & codegen commands. This work will be done in v0.10, and this PR will be merged as it's a quick-fix that doesn't touch too much code.
|
Actually, going to paste my full thoughts here:
The logic for build should be something like this: const project = createProject(manifest);
const supportedProject =
project.isWasm() ||
project.isPlugin() ||
project.isInterface();
if (!supportedProject) {
throw Error("Unsupported project type...");
}
// 1. Parse schema & build wrap.info
const schemaComposer = new SchemaComposer(...);
const infoCompiler = new WrapInfoCompiler(...);
infoCompiler.compile();
// 2, Compile wrap.wasm
if (project.isWasm()) {
const wasmCompiler = new WrapWasmCompiler(...);
wasmCompiler.compile();
}And we can refine the semantics around the
^^^ I guess this is the 3rd major architectural change :P |
Closes #1355
Targetting
0.9as it seems like a non-breaking change.The idea behind this fix is that building Interface projects doesn't require a
BuildStrategyat all.The
-sargument is essentially ignored for Interface projects, and a hiddenEmptyBuildStrategyis used, which does nothing.Additionally, an
infomessage is rendered to the user.Users can't explicitly use this strategy.