If I just add enzo crate to a project I get a bunch of errors. I had to pin the version of source-map
to get the build to work.
error[E0433]: failed to resolve: could not find `StringWithSourceMap` in `source_map`
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/modules.rs:81:29
|
81 | let mut buf = source_map::StringWithSourceMap::new();
| ^^^^^^^^^^^^^^^^^^^ could not find `StringWithSourceMap` in `source_map`
error[E0599]: no associated item named `NULL_SPAN` found for struct `BaseSpan` in the current scope
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/errors.rs:170:51
|
170 | ParseError::new(ParseErrors::LexingFailed, Span::NULL_SPAN)
| ^^^^^^^^^ associated item not found in `BaseSpan<()>`
Compiling oxc v0.7.0
error[E0599]: no associated item named `NULL_SPAN` found for struct `BaseSpan` in the current scope
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/expressions/mod.rs:1808:38
|
1808 | SpreadExpression::Empty => &Span::NULL_SPAN,
| ^^^^^^^^^ associated item not found in `BaseSpan<()>`
error[E0599]: no associated item named `NULL_SPAN` found for struct `BaseSpan` in the current scope
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/extensions/jsx.rs:237:33
|
237 | JSXNode::LineBreak => &Span::NULL_SPAN,
| ^^^^^^^^^ associated item not found in `BaseSpan<()>`
error[E0061]: this function takes 1 argument but 0 arguments were supplied
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/modules.rs:88:17
|
88 | let mut buf = source_map::Counter::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^-- an argument of type `usize` is missing
|
note: associated function defined here
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/source-map-0.14.10/src/to_string.rs:215:12
|
215 | pub fn new(max: usize) -> Self {
| ^^^
help: provide the argument
|
88 | let mut buf = source_map::Counter::new(/* usize */);
| ~~~~~~~~~~~~~
error[E0599]: no associated item named `NULL` found for struct `SourceId` in the current scope
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/visiting.rs:313:15
|
313 | SourceId::NULL
| ^^^^ associated item not found in `SourceId`
|
note: if you're trying to build a new `SourceId`, consider using `SourceId::new` which returns `SourceId`
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/source-map-0.14.10/src/source_id.rs:18:5
|
18 | pub fn new(filesystem: &mut impl FileSystem, path: PathBuf, content: String) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
258 + use source_map::Nullable;
|
error[E0599]: no associated item named `NULL_SPAN` found for struct `BaseSpan` in the current scope
--> /Users/amcclenaghan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ezno-parser-0.1.3/src/visiting.rs:413:21
|
413 | None => &Span::NULL_SPAN,
| ^^^^^^^^^ associated item not found in `BaseSpan<()>`