Skip to content

load(BREAKING)!: improve load options#287

Merged
wenchy merged 15 commits intomasterfrom
load-options
Aug 20, 2025
Merged

load(BREAKING)!: improve load options#287
wenchy merged 15 commits intomasterfrom
load-options

Conversation

@Kybxd
Copy link
Copy Markdown
Collaborator

@Kybxd Kybxd commented Aug 19, 2025

Field Mode in load.BaseOptions is redefined:

  • BREAKING: Mode LoadMode -> Mode *LoadMode
  • BREAKING: load.Paths and load.PatchPaths are removed. Use load.WithMessagerOptions instead.
  • load.modeNone is removed from load.LoadMode
  • load.LoadMessagerInDir and load.LoadMessager can accept nil *load.MessagerOptions now.

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 80.72289% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.36%. Comparing base (a00850e) to head (94da109).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
load/options.go 74.50% 9 Missing and 4 partials ⚠️
load/load.go 90.62% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #287      +/-   ##
==========================================
- Coverage   71.42%   71.36%   -0.06%     
==========================================
  Files          84       84              
  Lines       10334    10358      +24     
==========================================
+ Hits         7381     7392      +11     
- Misses       2388     2397       +9     
- Partials      565      569       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread test/functest/testdata/default/excel/dev/hero/Hero#@TABLEAU.csv Outdated
@wenchy wenchy changed the title feat(BREAKING!): update load options load(BREAKING)!: improve load options Aug 19, 2025
Comment thread load/options.go Outdated
Comment thread load/options.go Outdated
Comment thread load/options.go Outdated
Comment thread load/options.go Outdated
}
}
// LoadOptions is the functional option type.
type LoadOption func(*LoadOptions)
Copy link
Copy Markdown
Member

@wenchy wenchy Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is no need to change naming, as it is already in load package:

  • Options-> LoadOptions
  • Option -> LoadOption

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep consistent with cpp implementations is better for subsequent maintenance.

Copy link
Copy Markdown
Member

@wenchy wenchy Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As MessagerOptions is also load options only for messager-level. For consistency, should we also rename it to LoadMessagerOptions just like Options renamed to LoadOptions?

  • Options-> LoadOptions
  • MessagerOptions-> LoadMessagerOptions

A better solution can be considered. C++ or other programming languages can use load namespace:

For example:

namespace load {

struct Options {
  ...
}

struct MessagerOptions {
  ...
}

} // namespace load

Comment thread load/load.go Outdated
Comment thread load/load.go Outdated
@wenchy wenchy merged commit 0b0be0a into master Aug 20, 2025
9 checks passed
@wenchy wenchy deleted the load-options branch August 20, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants