-
Notifications
You must be signed in to change notification settings - Fork 55
(GH-538) Re-export dsc-lib-jsonschema in dsc-lib
#1306
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
(GH-538) Re-export dsc-lib-jsonschema in dsc-lib
#1306
Conversation
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.
Pull request overview
This PR re-exports the dsc-lib-jsonschema crate as dsc_lib::schemas, consolidating JSON Schema-related functionality and enabling more flexible dependency management. The change allows consumers to either depend on the full dsc-lib or just dsc-lib-jsonschema for schema-only needs.
Key changes:
- Re-exported
dsc-lib-jsonschemaas a public module indsc-libinstead of internal module implementation - Migrated schema types (
DscRepoSchema,SchemaForm,SchemaUriPrefix,RecognizedSchemaVersion) todsc-lib-jsonschema - Moved
UnrecognizedSchemaUrierror type todsc-lib-jsonschemaand implemented proper error delegation with#[from]attribute - Added build script infrastructure to dynamically generate
RecognizedSchemaVersionenum from git tags
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
lib/dsc-lib/src/lib.rs |
Re-exports dsc-lib-jsonschema as schemas module |
lib/dsc-lib/src/schemas/mod.rs |
Removed 694-line module (functionality moved to dsc-lib-jsonschema) |
lib/dsc-lib-jsonschema/src/lib.rs |
Added dsc_repo module export |
lib/dsc-lib-jsonschema/src/dsc_repo/mod.rs |
Main module consolidating schema URI generation and management logic |
lib/dsc-lib-jsonschema/src/dsc_repo/dsc_repo_schema.rs |
Defines DscRepoSchema trait and UnrecognizedSchemaUri error type |
lib/dsc-lib-jsonschema/src/dsc_repo/schema_form.rs |
Defines SchemaForm enum for different schema publication forms |
lib/dsc-lib-jsonschema/src/dsc_repo/schema_uri_prefix.rs |
Defines SchemaUriPrefix enum for schema URI prefixes |
lib/dsc-lib-jsonschema/src/dsc_repo/recognized_schema_version.rs |
Includes generated code for RecognizedSchemaVersion enum |
lib/dsc-lib-jsonschema/build.rs |
New build script that generates RecognizedSchemaVersion enum from version data |
lib/dsc-lib-jsonschema/.versions.ps1 |
PowerShell script to query git tags and update version data |
lib/dsc-lib-jsonschema/.versions.json |
Version data used for code generation |
lib/dsc-lib-jsonschema/Cargo.toml |
Added thiserror dependency and build dependencies |
lib/dsc-lib-jsonschema/locales/en-us.toml |
Added localization strings for UnrecognizedSchemaUri error |
lib/dsc-lib-jsonschema/src/tests/dsc_repo.rs |
Migrated tests for dsc_repo module functionality |
lib/dsc-lib/src/dscerror.rs |
Updated error handling to use #[from] for UnrecognizedSchemaUri |
lib/dsc-lib/locales/en-us.toml |
Removed localization strings moved to dsc-lib-jsonschema |
lib/dsc-lib/src/extensions/extension_manifest.rs |
Updated imports and method name (schema_metadata → schema_property_metadata) |
lib/dsc-lib/src/dscresources/resource_manifest.rs |
Updated imports and method name |
lib/dsc-lib/src/configure/config_doc.rs |
Updated imports and method name |
lib/dsc-lib/src/extensions/dscextension.rs |
Updated import path for idiomaticize_string_enum |
lib/dsc-lib/src/dscresources/dscresource.rs |
Updated import path for idiomaticize_string_enum |
lib/dsc-lib/src/discovery/command_discovery.rs |
Updated import path for idiomaticize_externally_tagged_enum |
lib/dsc-lib/src/configure/config_result.rs |
Updated import path for idiomaticize_string_enum |
lib/dsc-lib/src/configure/config_progress.rs |
Updated import path for idiomaticize_string_enum |
tools/test_group_resource/src/main.rs |
Updated import path for DscRepoSchema |
lib/dsc-lib-jsonschema/.clippy.toml |
Added "PowerShell" to valid identifiers |
Cargo.lock |
Updated with new thiserror dependency for dsc-lib-jsonschema |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6da04b2 to
93a3470
Compare
Prior to this change, the `dsc-lib` crate used `dsc-lib-jsonschema` as a dependency. With the transition of the `DscRepoSchema` trait and the related types to the `dsc-lib-jsonschema` crate, it makes more sense to re-export the dependency from within the `dsc-lib` crate. This change re-exports the `dsc-lib-jsonschema` crate as `dsc_lib::schemas`, replacing the prior module and direct references to `dsc-lib-jsonschema` for transformers and other crate functionality. Now other crates can choose whether to depend on `dsc-lib` with all of the associated functionality, or `dsc-lib-jsonschema` if they only need the JSON Schema related functionality.
93a3470 to
fb4fb26
Compare
PR Summary
Important
This change depends on #1304 - it will remain in draft until that change merges.
This change re-exports the
dsc-lib-jsonschemacrate asdsc_lib::schemas, replacing the prior module and direct references todsc-lib-jsonschemafor transformers and other crate functionality.Now other crates can choose whether to depend on
dsc-libwith all of the associated functionality, ordsc-lib-jsonschemaif they only need the JSON Schema related functionality.PR Context
Prior to this change, the
dsc-libcrate useddsc-lib-jsonschemaas a dependency. With the transition of theDscRepoSchematrait and the related types to thedsc-lib-jsonschemacrate, it makes more sense to re-export the dependency from within thedsc-libcrate.