diff --git a/tools/codegen/Cargo.toml b/tools/codegen/Cargo.toml index 269d8994..a9fbf8f2 100644 --- a/tools/codegen/Cargo.toml +++ b/tools/codegen/Cargo.toml @@ -14,7 +14,7 @@ serde = "1" serde_derive = "1" serde_json = "1" sha2 = "0.10" -spdx = "0.11" +spdx = "0.12" tar = "0.4" toml = { version = "0.9", default-features = false, features = ["parse", "serde"] } # TODO: call curl command instead of using ureq? diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index c4aed78a..bc2dd7ec 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -834,16 +834,14 @@ fn get_license_markdown(spdx_expr: &str, repo: &str, default_branch: &str) -> Op ExprNode::Req(ExpressionReq { req: spdx::LicenseReq { - license: spdx::LicenseItem::Spdx { id, or_later }, - exception, - .. + license: spdx::LicenseItem::Spdx { id, or_later }, addition, .. }, .. }) => { if *or_later { panic!("need to handle or_later"); } - if let Some(exception_id) = exception { + if let Some(spdx::AdditionItem::Spdx(exception_id)) = addition { license_ids.push((id, Some(exception_id))); } else { license_ids.push((id, None));