Skip to content

Commit

Permalink
configloader: change how we detect oss build
Browse files Browse the repository at this point in the history
Summary: First I used "not-fb" to mean oss, but we use that mode internally for various reasons. Instead, use the renamed "sl_oss" feature which is only set during the Sapling OSS build.

Reviewed By: markbt

Differential Revision: D55422609

fbshipit-source-id: f50d1f959bf58790be4e1164477be964fd634bef
  • Loading branch information
muirdm authored and facebook-github-bot committed Mar 27, 2024
1 parent 57a6c86 commit 985aaba
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 72 deletions.
68 changes: 0 additions & 68 deletions addons/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,6 @@
dependencies:
"@babel/types" "^7.18.6"

"@babel/helper-annotate-as-pure@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882"
integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-compilation-targets@^7.18.9":
version "7.18.9"
resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz"
Expand Down Expand Up @@ -214,21 +207,6 @@
"@babel/helper-replace-supers" "^7.18.9"
"@babel/helper-split-export-declaration" "^7.18.6"

"@babel/helper-create-class-features-plugin@^7.23.9":
version "7.23.10"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.10.tgz#25d55fafbaea31fd0e723820bb6cc3df72edf7ea"
integrity sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw==
dependencies:
"@babel/helper-annotate-as-pure" "^7.22.5"
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0"
"@babel/helper-member-expression-to-functions" "^7.23.0"
"@babel/helper-optimise-call-expression" "^7.22.5"
"@babel/helper-replace-supers" "^7.22.20"
"@babel/helper-skip-transparent-expression-wrappers" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
semver "^6.3.1"

"@babel/helper-environment-visitor@^7.18.9":
version "7.18.9"
resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz"
Expand Down Expand Up @@ -269,13 +247,6 @@
dependencies:
"@babel/types" "^7.18.9"

"@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366"
integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==
dependencies:
"@babel/types" "^7.23.0"

"@babel/helper-module-imports@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz"
Expand Down Expand Up @@ -322,13 +293,6 @@
dependencies:
"@babel/types" "^7.18.6"

"@babel/helper-optimise-call-expression@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e"
integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.8.0":
version "7.18.9"
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz"
Expand All @@ -350,15 +314,6 @@
"@babel/traverse" "^7.18.9"
"@babel/types" "^7.18.9"

"@babel/helper-replace-supers@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793"
integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==
dependencies:
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-member-expression-to-functions" "^7.22.15"
"@babel/helper-optimise-call-expression" "^7.22.5"

"@babel/helper-simple-access@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz"
Expand All @@ -380,13 +335,6 @@
dependencies:
"@babel/types" "^7.18.9"

"@babel/helper-skip-transparent-expression-wrappers@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847"
integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==
dependencies:
"@babel/types" "^7.22.5"

"@babel/helper-split-export-declaration@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz"
Expand Down Expand Up @@ -513,15 +461,6 @@
"@babel/helper-create-class-features-plugin" "^7.18.6"
"@babel/helper-plugin-utils" "^7.18.6"

"@babel/plugin-proposal-decorators@^7.23.9":
version "7.23.9"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.9.tgz#126d947d62ee72022ec46813983c6dd861456fa3"
integrity sha512-hJhBCb0+NnTWybvWq2WpbCYDOcflSbx0t+BYP65e5R9GVnukiDTi+on5bFkk4p7QGuv190H6KfNiV9Knf/3cZA==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.23.9"
"@babel/helper-plugin-utils" "^7.22.5"
"@babel/plugin-syntax-decorators" "^7.23.3"

"@babel/plugin-proposal-object-rest-spread@^7.0.0":
version "7.18.9"
resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz"
Expand Down Expand Up @@ -554,13 +493,6 @@
dependencies:
"@babel/helper-plugin-utils" "^7.12.13"

"@babel/plugin-syntax-decorators@^7.23.3":
version "7.23.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.23.3.tgz#a1d351d6c25bfdcf2e16f99b039101bc0ffcb0ca"
integrity sha512-cf7Niq4/+/juY67E0PbgH0TDhLQ5J7zS8C/Q5FFx+DWyrRa9sUQdTXkjqKu8zGvuqr7vw1muKiukseihU+PJDA==
dependencies:
"@babel/helper-plugin-utils" "^7.22.5"

"@babel/plugin-syntax-flow@^7.0.0", "@babel/plugin-syntax-flow@^7.18.6":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz"
Expand Down
5 changes: 4 additions & 1 deletion eden/scm/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ rust_binary(
"commands/eden",
],
"fb": ["commands/fb"],
"sl_oss": ["clidispatch/sl_oss"],
"sl_oss": [
"clidispatch/sl_oss",
"commands/sl_oss",
],
"with_chg": [
"dirs",
"identity",
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/exec/hgmain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ buildinfo = []
default = []
eden = ["clidispatch/eden", "commands/eden"]
fb = ["commands/fb"]
sl_oss = ["clidispatch/sl_oss"]
sl_oss = ["clidispatch/sl_oss", "commands/sl_oss"]
with_chg = ["dirs", "identity"]

[profile.release]
Expand Down
1 change: 1 addition & 0 deletions eden/scm/lib/commands/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,4 @@ zstd = { version = "0.13", features = ["experimental", "zstdmt"] }
default = []
eden = ["clidispatch/eden", "cmddebugwait/eden", "cmdgoto/eden", "pycheckout/eden", "pyworkingcopy/eden", "pyworkingcopyclient/eden"]
fb = ["cmddebugdumpinternalconfig/fb", "cmddebugrefreshconfig/fb", "cmdpy/fb", "cmdversion/fb", "configloader/fb", "identity/fb"]
sl_oss = ["configloader/sl_oss"]
3 changes: 3 additions & 0 deletions eden/scm/lib/commands/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ rust_library(
"cmddebugdumpinternalconfig/fb",
"cmddebugrefreshconfig/fb",
],
"sl_oss": [
"configloader/sl_oss",
],
},
},
},
Expand Down
1 change: 1 addition & 0 deletions eden/scm/lib/config/loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ testutil = { version = "0.1.0", path = "../../util/testutil" }
[features]
default = []
fb = ["filetime", "hgtime", "http-client", "identity/fb", "regex", "serde", "serde_json", "serde_urlencoded", "sha2", "sha2", "tempfile", "types", "zstd"]
sl_oss = []
5 changes: 4 additions & 1 deletion eden/scm/lib/config/loader/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ rust_library(
"serde_urlencoded",
"sha2",
],
"sl_oss": [],
},
},
},
crate_root = "src/lib.rs",
features = ["fb"],
features = [
"fb",
],
test_deps = [
"fbsource//third-party/rust:once_cell",
"fbsource//third-party/rust:tempfile",
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/config/loader/src/builtin_static/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub(crate) fn builtin_system(opts: Options, ident: &Identity) -> UnionConfig {
}
}

if !cfg!(feature = "fb") {
if cfg!(feature = "sl_oss") {
configs.push(Arc::new(&open_source::CONFIG));
}

Expand Down

0 comments on commit 985aaba

Please sign in to comment.