ChainSafe / fil-actor-states

State handling crates for the Filecoin Actors
Apache License 2.0
3 stars 2 forks source link

[Enhancement] Get rid of subpackages. #271

Open ruseinov opened 4 months ago

ruseinov commented 4 months ago

Issue summary

Right now we have declare every actor as a separate dependency in Cargo.toml. That seems suboptimal. That also makes it a pain to work with, especially when patching dependencies.

This:

[patch.crates-io]
fil_actor_account_state = { path = "../fil-actor-states/actors/account" }
fil_actor_cron_state = { path = "../fil-actor-states/actors/cron" }
fil_actor_datacap_state = { path = "../fil-actor-states/actors/datacap" }
fil_actor_init_state = { path = "../fil-actor-states/actors/init" }
fil_actor_interface = { path = "../fil-actor-states/fil_actor_interface"}
fil_actor_market_state = { path = "../fil-actor-states/actors/market" }
fil_actor_miner_state = { path = "../fil-actor-states/actors/miner" }
fil_actor_power_state = { path = "../fil-actor-states/actors/power" }
fil_actor_reward_state = { path = "../fil-actor-states/actors/reward" }
fil_actor_system_state = { path = "../fil-actor-states/actors/system" }
fil_actor_verifreg_state = { path = "../fil-actor-states/actors/verifreg" }
fil_actors_shared = { path = "../fil-actor-states/fil_actors_shared", features = ["json"] }

could look like this:

[patch.crates-io]
fil_actor_state = { path = "../fil-actor-states/actors" }
fil_actor_interface = { path = "../fil-actor-states/fil_actor_interface"}
fil_actors_shared = { path = "../fil-actor-states/fil_actors_shared", features = ["json"] }

or potentially even like this, if we wanted to get rid of interface and shared subpackages.

[patch.crates-io]
fil_actors_state = { path = "../fil-actor-states" }

Other information and links

It seems like we're already on the same page that the states could be unified. It would be nice to discuss whether or not we can get rid of the other subpackages.

aatifsyed commented 4 months ago

I really want to see one package, and an automated scrubbing process for creating new versions so people don't have to manually copy and paste. Fully support this move

ruseinov commented 3 months ago

I have just realized that we can't easily get rid of those, as all this stuff is a copy-paste from upstream. So we'd have to make an upstream contribution first..