-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move generating_json_schema to generate
crate
#608
Move generating_json_schema to generate
crate
#608
Conversation
60a4526
to
e13c113
Compare
generate
crate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove generate_docs and generate_json_schema from https://github.com/membraneframework/live_compositor/blob/master/build_tools/nix/package.nix#L64
.github/workflows/deploy_docs.yml
Outdated
@@ -7,7 +7,7 @@ on: | |||
paths: | |||
- "docs/**" | |||
- "schemas/**" | |||
- "src/bin/generate_docs/**" | |||
- "src/bin/generate/generate_docs/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong path
generate/Cargo.toml
Outdated
@@ -7,9 +7,10 @@ license = "BUSL-1.1" | |||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |||
|
|||
[dependencies] | |||
live_compositor = { path = ".." } | |||
live_compositor = { path = "..", features=["decklink"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work for you if you run locally cargo clippy --allow-dirty --allow-staged --workspace --all-targets
?
I assume it will fail on decklink compilation on macOS.
Verify that, but if I'm correct you will need to add feature to this crate that optionally enable feature on live_compositor crate. Similiar to https://github.com/membraneframework/live_compositor/blob/master/Cargo.toml#L22
587014f
to
d279f56
Compare
d279f56
to
c8c388d
Compare
mod schema_parser; | ||
|
||
fn main() { | ||
pub fn generate_docs() { | ||
tracing_subscriber::fmt().init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move that init outside to the main function
.parent() | ||
.unwrap() | ||
.join("docs/pages/api/generated"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.parent() | |
.unwrap() | |
.join("docs/pages/api/generated"); | |
.join("../docs/pages/api/generated"); |
.parent() | ||
.unwrap() | ||
.join(format!("schemas/{}.schema.json", name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.parent() | |
.unwrap() | |
.join(format!("schemas/{}.schema.json", name)); | |
.join(format!("../schemas/{}.schema.json", name)); |
c8c388d
to
377746c
Compare
377746c
to
4f6d13b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Move generate_json_schema and generate_docs to
generate
crate.Substitute commands responsible for generating json schema and docs with one command
cargo run generate_from_type
- it updates both docs and schema. Run with--check
checks if json schema hasn't changed.