Skip to content
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

Consolidate the projects #768

Closed
kvark opened this issue Jun 11, 2015 · 13 comments

Comments

@kvark
Copy link
Member

commented Jun 11, 2015

A bit of history:

  • gfx-rs started as a single project, having everything (renderer, device, macros, even windowing stuff) under one repository in different modules
  • macros were moved out
  • eventually, associated types got supported by Rust, and we were able to move the device out
  • examples followed the suit
  • we ended up following Piston organization style and created a repository per project. More and more showed up, mostly bearing just a bit of function.

Currently we have 10 projects closely related to gfx-rs, and this number doesn't include gfx_scene or genmesh. This confuses newcomers and throttles our ability to do cross-project changes.

Unexpectedly, a new style of organization showed up to be effective in gfx_scene and claymore: gather all relevant projects under one roof and use both path = and version = in the dependencies. As it turned out, this scheme has proper crates dependencies and publishing doesn't require any temporary changes. I propose to follow this scheme for gfx-rs as well to get:

  • easier branching (especially for new major versions)
  • easier pull requests with no/less dependencies
  • faster and more secure builds (single cargo test does everything)
  • less confusion for the users (gfx-rs organization would have 4 projects instead of 13)
  • single issue database

Paint me red and stuff, but I don't see the downsides. Note that we can do it right now without breaking anything, since users now depend on crates.io. Here is how I see the consolidated repo:

gfx/ # does it make sense to keep it gfx-rs?
  examples/ # gfx_examples/bin
  src/
    aux/
       gl/ # gfx_gl
    backend/
      gl/ # gfx_device_gl
      dummy/ # gfx_device_dummy
      vulkan/ # gfx_device_vulkan
    core/ # gfx-rs
    draw_state/ # arguable, lets hear @bvssvni
    window/
      glfw/ # gfx_window_glfw
      glutin/ # gfx_window_glutin
    main.rs # empty, just to depend on all the crates
  info/ # additional documentation, like what we have in gfx-rs/wiki
  .travis.yml # there can be only one

Summoning @gfx-rs/developers for discussion!

@ghost

This comment has been minimized.

Copy link

commented Jun 11, 2015

This is similar to how we started.

I don't have a problem with this, but I want to preserve the commit history of all our projects. Not sure how to do with when merging git repos but there is bound to be a stackoverflow for it.

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2015

@csherratt Good point. gfx_device_gl in particular has some history. On the other hand, most of the changes reflect the associated gfx-rs PRs.

@fkaa

This comment has been minimized.

Copy link
Member

commented Jun 11, 2015

Not a @gfx-rs/developers but i think it sounds great! I didn't exactly have a good time making a PR for 5 separate gfx repos at the same time...

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2015

@fkaa fixed!

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2015

Small issue: gfx_gl uses git submodules, which would need to be moved into the whole repo. I don't like this idea, so leaving gfx_gl aside for now.

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 12, 2015

Another issue: tests for dependent projects are not started automatically by cargo.test. We may need to pull all the tests into the root crate.

@kvark kvark referenced this issue Jun 12, 2015

Closed

Unity #769

@kvark kvark self-assigned this Jun 12, 2015

@brendanzab

This comment has been minimized.

Copy link
Member

commented Jun 13, 2015

Don't have a problem with this, but I echo the comments about preserving git history.

@brendanzab

This comment has been minimized.

Copy link
Member

commented Jun 13, 2015

I wounder if this should be a medium or hard, given the difficulty of the repo merger.

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2015

@bjz thanks for coming in!

Since we use 'hard' for the most difficult issues (like, implement DX backend), this one deserves a vague average rating.

I'll redo the PR with preserved history, not sure how painful it's going to be though. If you want to try it yourself, please give me a short nod so that we don't duplicate this exciting work.

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2015

Heads up - SO answer seems to be working fine, I'm half-way through the change.

@ghost

This comment has been minimized.

Copy link

commented Jun 13, 2015

🎉 Wonderful @kvark

@bvssvni

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2015

Nice!

@kvark

This comment has been minimized.

Copy link
Member Author

commented Jun 15, 2015

@bvssvni I was thinking if you would consider the unification of some degree for Piston repositories. Their diversity and number often seemed to be a source of confusion.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.