This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
feat: add CLI + Pipeline compatibility check #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature gives a helpful message when running the CLI to clarify whether the CLI and the slated pipeline are compatible.
I ran into an issue while working on this, however.
I failed to run any pipeline that specified a Cicada version that wasn't the same as the CLI's one.
For example, I'm running the latest CLI version,
0.1.50
.If I change the Cicada import in
.cicada/test.ts
fromimport { Job, Pipeline } from "https://deno.land/x/cicada/mod.ts";
(which will resolve to the latest version, 0.1.50)to
import { Job, Pipeline } from "https://deno.land/x/[email protected]/mod.ts";
I get the following error:
It is
serialize.ts
that is throwing the error.:This is confusing.
test.ts
still exports the default typepipeline
(the only line I changed in the pipeline is the Cicada import).Though I'm not sure what the cause is, it likely is just the method Cicada currently uses to cache the module. It may be that different Cicada versions of
Pipeline
are being treated as entirely different types. This causes them not to make it passedserialize.ts
.I didn't want to make non-trivial changes to the caching code before getting feedback on whether I'm on the right track, so here is a draft.