Skip to content

Commit 900686a

Browse files
(GH-1153) rename dsc_lib to dsc-lib
This change renames `dsc_lib` to `dsc-lib`. This is done for a few reasons: 1. The general naming convention for rust crates is `kebab-case` for crates, `snake_case` for modules. This aligns the naming convention. Note that kebab-case crate names are still referenced with underscores as `snake_case`, so no code needed to be changed in crates, only the cargo manifests. 1. When we eventually publish the library crates, we will need to use a coherent naming convention. Standardizing on `dsc-lib` as a prefix ensures that the other library crates can follow this convention and more readily be discovered and collected. The other libraries are only intended for use with DSC. This change ensures that the manifests and build script are updated to use the renamed crate. I decided to keep a 1:1 map of crate name and folder, to limit confusion over having more than one `dsc` folder in the project.
1 parent ab91776 commit 900686a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+41
-42
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44
# the path to a crate.
55
members = [
66
"dsc",
7-
"lib/dsc_lib",
7+
"lib/dsc-lib",
88
"resources/dscecho",
99
"lib/osinfo_lib",
1010
"resources/osinfo",
@@ -26,7 +26,7 @@ members = [
2626
# avoid unintentionally modifying this value.
2727
default-members = [
2828
"dsc",
29-
"lib/dsc_lib",
29+
"lib/dsc-lib",
3030
"resources/dscecho",
3131
"lib/osinfo_lib",
3232
"resources/osinfo",
@@ -50,7 +50,7 @@ default-members = [
5050
# current operating system to enable faster builds.
5151
Windows = [
5252
"dsc",
53-
"lib/dsc_lib",
53+
"lib/dsc-lib",
5454
"resources/dscecho",
5555
"lib/osinfo_lib",
5656
"resources/osinfo",
@@ -69,7 +69,7 @@ Windows = [
6969
]
7070
macOS = [
7171
"dsc",
72-
"lib/dsc_lib",
72+
"lib/dsc-lib",
7373
"resources/dscecho",
7474
"lib/osinfo_lib",
7575
"resources/osinfo",
@@ -85,7 +85,7 @@ macOS = [
8585
]
8686
Linux = [
8787
"dsc",
88-
"lib/dsc_lib",
88+
"lib/dsc-lib",
8989
"resources/dscecho",
9090
"lib/osinfo_lib",
9191
"resources/osinfo",
@@ -111,99 +111,99 @@ strip = "symbols" # See split-debuginfo - allows us to drop the size b
111111

112112
[workspace.dependencies]
113113
#external dependencies
114-
# dsc_lib
114+
# dsc-lib
115115
base32 = { version = "0.5" }
116-
# dsc_lib
116+
# dsc-lib
117117
base64 = { version = "0.22" }
118-
# dsc_lib, sshdconfig
118+
# dsc-lib, sshdconfig
119119
chrono = { version = "0.4" }
120-
# dsc, dsc_lib, dscecho, registry, runcommandonset, sshdconfig, dsctest, test_group_resource
120+
# dsc, dsc-lib, dscecho, registry, runcommandonset, sshdconfig, dsctest, test_group_resource
121121
clap = { version = "4.5", features = ["derive"] }
122122
# dsc
123123
clap_complete = { version = "4.5" }
124124
# dsc, registry, registry_lib, sshdconfig
125125
crossterm = { version = "0.29" }
126126
# dsc
127127
ctrlc = { version = "3.5" }
128-
# dsc_lib
128+
# dsc-lib
129129
derive_builder = { version = "0.20" }
130-
# dsc, dsc_lib
130+
# dsc, dsc-lib
131131
indicatif = { version = "0.18" }
132132
# security_context_lib::windows
133133
is_elevated = { version = "0.1" }
134-
# dsc, dsc_lib
134+
# dsc, dsc-lib
135135
jsonschema = { version = "0.33", default-features = false }
136-
# dsc_lib
136+
# dsc-lib
137137
linked-hash-map = { version = "0.5" }
138-
# dsc_lib
138+
# dsc-lib
139139
murmurhash64 = { version = "0.3" }
140140
# security_context_lib::not_windows
141141
nix = { version = "0.30" }
142-
# dsc_lib
142+
# dsc-lib
143143
num-traits = { version = "0.2" }
144144
# osinfo_lib
145145
os_info = { version = "3.11" }
146-
# dsc, dsc_lib
146+
# dsc, dsc-lib
147147
path-absolutize = { version = "3.1" }
148-
# dsc, dsc_lib
148+
# dsc, dsc-lib
149149
regex = { version = "1.11" }
150150
# registry, registry_lib
151151
registry = { version = "1.3" }
152152
# dsc
153153
rmcp = { version = "0.6" }
154-
# dsc_lib
154+
# dsc-lib
155155
rt-format = { version = "0.3" }
156-
# dsc, dsc_lib, dscecho, registry, registry_lib, runcommandonset, sshdconfig
156+
# dsc, dsc-lib, dscecho, registry, registry_lib, runcommandonset, sshdconfig
157157
rust-i18n = { version = "3.1" }
158-
# dsc, dsc_lib, dscecho, registry, registry_lib, sshdconfig, dsctest, test_group_resource
158+
# dsc, dsc-lib, dscecho, registry, registry_lib, sshdconfig, dsctest, test_group_resource
159159
schemars = { version = "1.0", features = ["preserve_order"] }
160-
# dsc, dsc_lib
160+
# 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, osinfo_lib, 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, osinfo_lib, osinfo, process, registry, registry_lib, runcommandonset, sshdconfig, dsctest, test_group_resource, y2j
165165
serde_json = { version = "1.0", features = ["preserve_order"] }
166-
# dsc, dsc_lib, y2j
166+
# dsc, dsc-lib, y2j
167167
serde_yaml = { version = "0.9" }
168168
# dsc, y2j
169169
syntect = { version = "5.0", features = ["default-fancy"], default-features = false }
170170
# dsc, process
171171
sysinfo = { version = "0.37" }
172172
# sshdconfig
173173
tempfile = { version = "3.22" }
174-
# dsc, dsc_lib, registry, registry_lib, sshdconfig
174+
# dsc, dsc-lib, registry, registry_lib, sshdconfig
175175
thiserror = { version = "2.0" }
176-
# dsc, dsc_lib
176+
# dsc, dsc-lib
177177
tokio = { version = "1.47" }
178178
# dsc
179179
tokio-util = { version = "0.7" }
180-
# dsc, dsc_lib, registry, registry_lib, runcommandonset, sshdconfig
180+
# dsc, dsc-lib, registry, registry_lib, runcommandonset, sshdconfig
181181
tracing = { version = "0.1" }
182-
# dsc, dsc_lib
182+
# dsc, dsc-lib
183183
tracing-indicatif = { version = "0.3" }
184184
# dsc, registry, registry_lib, runcommandonset, sshdconfig
185185
tracing-subscriber = { version = "0.3", features = ["ansi", "env-filter", "json"] }
186-
# dsc_lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
186+
# dsc-lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
187187
tree-sitter = { version = "0.25" }
188188
# tree-sitter-dscexpression, tree-sitter-ssh-server-config
189189
tree-sitter-language = { version = "0.1" }
190-
# dsc_lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
190+
# dsc-lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
191191
tree-sitter-rust = { version = "0.24" }
192192
# registry, registry_lib
193193
utfx = { version = "0.1" }
194-
# dsc_lib
194+
# dsc-lib
195195
uuid = { version = "1.18", features = ["v4"] }
196-
# dsc_lib
196+
# dsc-lib
197197
which = { version = "8.0" }
198198

199199
# build-only dependencies
200-
# dsc_lib, registry_lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
200+
# dsc-lib, registry_lib, sshdconfig, tree-sitter-dscexpression, tree-sitter-ssh-server-config
201201
cc = { version = "1.2" }
202202
# registry, registry_lib
203203
static_vcruntime = { version = "2.0" }
204204

205205
# Workspace crates as dependencies
206-
dsc_lib = { path = "lib/dsc_lib" }
206+
dsc-lib = { path = "lib/dsc-lib" }
207207
osinfo_lib = { path = "lib/osinfo_lib" }
208208
security_context_lib = { path = "lib/security_context_lib" }
209209
tree-sitter-dscexpression = { path = "grammars/tree-sitter-dscexpression" }

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ if (!$SkipBuild) {
358358
"grammars/tree-sitter-ssh-server-config",
359359
"lib/security_context_lib",
360360
"lib/osinfo_lib",
361-
"lib/dsc_lib",
361+
"lib/dsc-lib",
362362
"dsc",
363363
"resources/dscecho",
364364
"extensions/bicep",

dsc/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ tracing = { workspace = true }
3636
tracing-subscriber = { workspace = true }
3737
tracing-indicatif = { workspace = true }
3838
# workspace crate dependencies
39-
dsc_lib = { workspace = true }
40-
# dsc_lib = { path = "../dsc_lib" }
39+
dsc-lib = { workspace = true }

lib/dsc_lib/Cargo.toml renamed to lib/dsc-lib/Cargo.toml

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

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)