Use symlink to common submodule as using a filesystem dep prevents publishing

This commit is contained in:
Wilson Lin 2021-08-09 17:45:42 +10:00
commit 91bdcc3e44
38 changed files with 62 additions and 76 deletions

View file

@ -1,7 +1,7 @@
import { mkdirSync, writeFileSync } from "fs";
import { join } from "path";
export const RUST_OUT_DIR = join(__dirname, "..", "rust", "common", "src", "gen");
export const RUST_OUT_DIR = join(__dirname, "..", "rust", "common", "gen");
try {
mkdirSync(RUST_OUT_DIR);

View file

@ -21,7 +21,7 @@ const rsTagAttr = ({
let code = `
use lazy_static::lazy_static;
use std::collections::HashMap;
use crate::spec::tag::ns::Namespace;
use crate::common::spec::tag::ns::Namespace;
pub struct AttributeMinification {
pub boolean: bool,

View file

@ -159,7 +159,7 @@ export class TrieBuilder {
).join(", ");
const value = node.value === undefined ? "None" : `Some(${node.value})`;
const varValue = `&crate::pattern::TrieNode {
const varValue = `&crate::common::pattern::TrieNode {
offset: ${firstIdx},
value: ${value},
children: &[${children}],
@ -171,7 +171,7 @@ export class TrieBuilder {
const name = `${this.name}_NODE_${this.nextId++}`;
this.variables.push(
`static ${name}: &crate::pattern::TrieNode<${this.valueType}> = ${varValue};`
`static ${name}: &crate::common::pattern::TrieNode<${this.valueType}> = ${varValue};`
);
this.codeCache.set(varValue, name);
return name;