Skip to content

Commit dbaa039

Browse files
(GH-1153) Rename osinfo_lib to dsc-lib-osinfo
This change renames the `osinfo_lib` crate to `dsc-lib-osinfo`. This is to support eventual publishing of the crates. This crate is a dependency not only for the `osinfo` resource but also the `dsc-lib` crate. When we implement the Rust RDK, we will need to publish the library crates, and this ensures the naming is both consistent and easily discoverable. This change makes the requisite updates to cargo manifests, Rust code, and the build script.
1 parent 91a6293 commit dbaa039

File tree

9 files changed

+26
-26
lines changed

9 files changed

+26
-26
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ members = [
66
"dsc",
77
"lib/dsc-lib",
88
"resources/dscecho",
9-
"lib/osinfo_lib",
9+
"lib/dsc-lib-osinfo",
1010
"resources/osinfo",
1111
"lib/pal",
1212
"resources/process",
@@ -28,7 +28,7 @@ default-members = [
2828
"dsc",
2929
"lib/dsc-lib",
3030
"resources/dscecho",
31-
"lib/osinfo_lib",
31+
"lib/dsc-lib-osinfo",
3232
"resources/osinfo",
3333
"lib/pal",
3434
"resources/process",
@@ -52,7 +52,7 @@ Windows = [
5252
"dsc",
5353
"lib/dsc-lib",
5454
"resources/dscecho",
55-
"lib/osinfo_lib",
55+
"lib/dsc-lib-osinfo",
5656
"resources/osinfo",
5757
"lib/pal",
5858
"resources/process",
@@ -71,7 +71,7 @@ macOS = [
7171
"dsc",
7272
"lib/dsc-lib",
7373
"resources/dscecho",
74-
"lib/osinfo_lib",
74+
"lib/dsc-lib-osinfo",
7575
"resources/osinfo",
7676
"resources/process",
7777
"resources/runcommandonset",
@@ -87,7 +87,7 @@ Linux = [
8787
"dsc",
8888
"lib/dsc-lib",
8989
"resources/dscecho",
90-
"lib/osinfo_lib",
90+
"lib/dsc-lib-osinfo",
9191
"resources/osinfo",
9292
"resources/process",
9393
"resources/runcommandonset",
@@ -141,7 +141,7 @@ murmurhash64 = { version = "0.3" }
141141
nix = { version = "0.30" }
142142
# dsc-lib
143143
num-traits = { version = "0.2" }
144-
# osinfo_lib
144+
# dsc-lib-osinfo
145145
os_info = { version = "3.11" }
146146
# dsc, dsc-lib
147147
path-absolutize = { version = "3.1" }
@@ -159,9 +159,9 @@ rust-i18n = { version = "3.1" }
159159
schemars = { version = "1.0", features = ["preserve_order"] }
160160
# dsc, dsc-lib
161161
semver = { version = "1.0" }
162-
# dsc, dsc-lib, dscecho, osinfo_lib, process, registry, registry_lib, runcommandonset, sshdconfig, dsctest, test_group_resource
162+
# dsc, dsc-lib, dscecho, dsc-lib-osinfo, process, registry, registry_lib, runcommandonset, sshdconfig, dsctest, test_group_resource
163163
serde = { version = "1.0", features = ["derive"] }
164-
# dsc, dsc-lib, dscecho, osinfo_lib, osinfo, process, registry, registry_lib, runcommandonset, sshdconfig, dsctest, test_group_resource, y2j
164+
# dsc, dsc-lib, dscecho, dsc-lib-osinfo, osinfo, process, registry, registry_lib, runcommandonset, sshdconfig, dsctest, test_group_resource, y2j
165165
serde_json = { version = "1.0", features = ["preserve_order"] }
166166
# dsc, dsc-lib, y2j
167167
serde_yaml = { version = "0.9" }
@@ -204,7 +204,7 @@ static_vcruntime = { version = "2.0" }
204204

205205
# Workspace crates as dependencies
206206
dsc-lib = { path = "lib/dsc-lib" }
207-
osinfo_lib = { path = "lib/osinfo_lib" }
207+
dsc-lib-osinfo = { path = "lib/dsc-lib-osinfo" }
208208
security_context_lib = { path = "lib/security_context_lib" }
209209
tree-sitter-dscexpression = { path = "grammars/tree-sitter-dscexpression" }
210210
registry_lib = { path = "lib/registry_lib" }

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ if (!$SkipBuild) {
357357
"grammars/tree-sitter-dscexpression",
358358
"grammars/tree-sitter-ssh-server-config",
359359
"lib/security_context_lib",
360-
"lib/osinfo_lib",
360+
"lib/dsc-lib-osinfo",
361361
"lib/dsc-lib",
362362
"dsc",
363363
"resources/dscecho",

lib/osinfo_lib/Cargo.toml renamed to lib/dsc-lib-osinfo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "osinfo_lib"
2+
name = "dsc-lib-osinfo"
33
version = "1.0.0"
44
edition = "2021"
55

File renamed without changes.

lib/dsc-lib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tree-sitter-rust = { workspace = true}
3939
uuid = { workspace = true }
4040
which = { workspace = true }
4141
# workspace crate dependencies
42-
osinfo_lib = { workspace = true }
42+
dsc-lib-osinfo = { workspace = true }
4343
security_context_lib = { workspace = true }
4444
tree-sitter-dscexpression = { workspace = true }
4545

lib/dsc-lib/src/functions/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use crate::DscError;
55
use crate::configure::{context::Context as ConfigContext, config_doc::SecurityContextKind};
66
use crate::functions::{FunctionArgKind, Function, FunctionCategory, FunctionMetadata};
7-
use osinfo_lib::OsInfo;
7+
use dsc_lib_osinfo::OsInfo;
88
use rust_i18n::t;
99
use serde::Serialize;
1010
use serde_json::Value;

resources/osinfo/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2021"
77
# external dependencies
88
serde_json = { workspace = true }
99
# workspace crate dependencies
10-
osinfo_lib = { workspace = true }
10+
dsc-lib-osinfo = { workspace = true }

resources/osinfo/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
use osinfo_lib::OsInfo;
4+
use dsc_lib_osinfo::OsInfo;
55

66
fn main() {
77
let args: Vec<String> = std::env::args().collect();

0 commit comments

Comments
 (0)