-
Notifications
You must be signed in to change notification settings - Fork 157
refactor: replace builtin package with fluxinit/static #3304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c9e391a
to
8b49502
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few clarifying comments.
The FluxInit function references the builtin
package which has now been removed. We should update that comment.
Also adding a package comment to the static
package would be helpful.
@@ -1,13 +0,0 @@ | |||
// Package builtin contains all packages related to Flux built-ins are imported and initialized. | |||
// This should only be imported from main or test packages. | |||
// It is a mistake to import it from any other package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a similar comment to the new static
package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes thanks for catching that.
Also I expect you will have to create equivalent |
Yup, will need that too. |
ec6ebb7
to
c8e0f1e
Compare
A static initialization is not desirable in the main binaries, as it forces all paths of code to init, but it is still useful in tests. It allows static intialization to be performed once for all tests and eliminates the need to always add the FluxInit call. Added a fluxinit/static package that calls fluxinit.FluxInit() to replace the builtin package. This hides the nature of the initialization and makes it clear that it is mandatory initialization code.
c8e0f1e
to
dc0ec0d
Compare
Codecov Report
@@ Coverage Diff @@
## master #3304 +/- ##
==========================================
+ Coverage 49.34% 49.36% +0.01%
==========================================
Files 351 351
Lines 36393 36393
==========================================
+ Hits 17957 17964 +7
+ Misses 15913 15907 -6
+ Partials 2523 2522 -1
Continue to review full report at Codecov.
|
A static initialization is not desirable in the main binaries, as it forces all
paths of code to init, but it is still useful in tests. It allows static
intialization to be performed once for all tests and eliminates the need to
always add the FluxInit call. Added a fluxinit/static package that calls
fluxinit.FluxInit() to replace the builtin package. This hides the nature of
the initialization and makes it clear that it is mandatory initialization code.