forest
forest copied to clipboard
Cleanup build version module
Summary of changes Changes introduced in this pull request:
- [x] Remove forest/build.rs
- [x] Remove hardcoded user_version and use forest version
- [x] Remove api version numbers and use forest version
- [x] Remove BuiltType
- [x] Remove NodeType
Reference issue to close (if applicable)
Closes #1647
Other information and links
@lemmih Is this PR ok for merging? What's left to be done?
@lemmih Is this PR ok for merging? What's left to be done?
I'm still unsure what the version numbers mean. You said they came from Lotus but why do we want Lotus' version numbers?
@lemmih Is this PR ok for merging? What's left to be done?
I'm still unsure what the version numbers mean. You said they came from Lotus but why do we want Lotus' version numbers?
As far as I understand those are the RPC api version numbers. We have version 1.1.0
, and 1.5.0
/ 2.3.0
for Lotus (so different numbers).
I think this is arbitrary choice, it's just like regular semver.
@lemmih Is this PR ok for merging? What's left to be done?
I'm still unsure what the version numbers mean. You said they came from Lotus but why do we want Lotus' version numbers?
The version that I said came from Lotus was 0.10.2
.
const BUILD_VERSION: &str = "0.10.2";
This one was indeed removed.
I'm still quite confused:
- Why is the forest version string computed in the
fil_types
package rather than inforest
? - Why do we need a build script? It looks like the build script doesn't actually do anything (other than renaming a few env variables).
- Why do we define our own
Version
data structure? - Can't we get rid of
NodeType
andRUNNING_NODE_TYPE
?
I'm still quite confused:
- Why is the forest version string computed in the
fil_types
package rather than inforest
?
No reason anymore. Will change this.
- Why do we need a build script? It looks like the build script doesn't actually do anything (other than renaming a few env variables).
Unfortunately a const
binding can't be used because of the format!
is not const fn.
- Why do we define our own
Version
data structure?
Because we copied this from Lotus codebase. The rpc call wants an u32
and this is a helper struct.
- Can't we get rid of
NodeType
andRUNNING_NODE_TYPE
?
Yes.
I'm still quite confused:
- Why do we need a build script? It looks like the build script doesn't actually do anything (other than renaming a few env variables).
Unfortunately a
const
binding can't be used because of theformat!
is not const fn.
Do we need the version string to be const
? If it's just about performance, I'm fine with one extra call to format!
.
You can also delete ints
, PartialEq
, and Display
for Version
, I think.