[BUG]: sf package version create always warns about org-capitalize-record-types, even when it's set
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, nodejs
- 領域
- cli
調査の方向性
The cause sits in the dependency @salesforce/packaging: the settings generator is built at lib/package/packageVersionCreate.js:339 and packageConvert.js:185 without capitalizeRecordTypes. Read the ScratchOrgSettingsGenerator constructor in @salesforce/core (lib/org/scratchOrgSettingsGenerator.js:200), which warns when that option is undefined. Done when the org-capitalize-record-types value from ConfigAggregator is passed at both call sites and the warning no longer appears when the setting is set. The fix may belong in the packaging repository rather than this one.
索引モデルが issue の本文から書いたものです。
説明
Before You Submit
- I'm using the latest version of Salesforce CLI
- I've searched the existing issues
- I've run
sf doctorto diagnose common issues
Related Issue
No response
Command
sf package version create
Org Type
Developer Edition
Did this work before?
Yes, this is a regression
Last Working Version
No response
Summary
sf package version create prints this warning on every run:
Warning: Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the org-capitalize-record-types config var to true to enforce capitalization.
Setting the config var doesn't stop it, because package creation never reads the config var. The same happens when the definitionfile has no objectSettings or record types at all.
Repository to Reproduce
No response
Steps to reproduce
- sf config set org-capitalize-record-types=true (or set SF_CAPITALIZE_RECORD_TYPES=true)
- Use any scratch org definition file, even one with no objectSettings
- sf package version create -p -v -x -w 60
Expected Result
No warning when org-capitalize-record-types is set. The setting should also apply to how the build org is created, as it does for sf org create scratch.
Actual Result
The warning appears every time, and the setting is ignored. The build org always uses the hardcoded fallback (true).
System Information
- @salesforce/cli/2.152.14 win32-x64 node-v24.20.0
- @salesforce/plugin-packaging 3.0.7
- @salesforce/packaging 5.0.12
- @salesforce/core 9.2.0
- Windows 11, PowerShell 7
Additional Information
Cause
@salesforce/packaging creates the settings generator without passing the setting:
// @salesforce/packaging 5.0.12 — lib/package/packageVersionCreate.js:339
const settingsGenerator = new core_1.ScratchOrgSettingsGenerator({ asDirectory: true });
packageConvert.js:185 does the same thing. In @salesforce/core, the ScratchOrgSettingsGenerator constructor warns whenever capitalizeRecordTypes is undefined:
// @salesforce/core 9.2.0 — lib/org/scratchOrgSettingsGenerator.js:200
if (options?.capitalizeRecordTypes === undefined) {
void Lifecycle.getInstance().emitWarning(messages.getMessage('noCapitalizeRecordTypeConfigVar'));
this.capitalizeRecordTypes = true;
}
Suggested fix: in both packaging call sites, read org-capitalize-record-types from the ConfigAggregator and pass it as capitalizeRecordTypes, the same way scratch org creation does.
Related: #2633 introduced the config var; #2970 shows the warning in an unrelated package version create report.
Screenshots or Log Files
No response
- 主要言語
- 言語のデータがありません
- スター
- 571
- フォーク
- 80
- 平均マージ
- 23時間 43分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
forcedotcom/cli のほかの issue
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShape対応中かも @konkonrong-lgtm が 70 日前に担当しました。 オープンarea:afdx bug investigating owned by another team validated
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
forcedotcom/cli#3625 · コメント 4 件 ·
-
area:afdx bug owned by another team
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
forcedotcom/cli#3608 · コメント 2 件 ·
-
bug investigating validated
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
forcedotcom/cli#3667 · コメント 5 件 ·
-
[BUG]: NavigationMenu SourceMember name mismatch prevents source-tracked retrieve from completingオープンbug investigating validated
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
forcedotcom/cli#3660 · コメント 3 件 ·
-
announcement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
forcedotcom/cli#3658 · リアクション 1 件 ·
forcedotcom/cli の issue をすべて見る
似ている issue
-
[Bug]: `hermes plugins update` clones an entire monorepo twice - `subdir` is resolved but dropped at both catalog-update call sites対応中かも @HootRock が今日担当しました。 オープンcomp/cli P2 type/perf
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-agent#142417 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area:desktop priority:p2 type:chore
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
DietrichGebert/ponytail#1206 ·
メンテナーはふだん 2 日以内に返信
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
gke-labs/kube-agents#3615 ·
メンテナーはふだん 1 日以内に返信