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

Modifying upstream crates #6

Open
jethrogb opened this issue Mar 7, 2018 · 6 comments
Open

Modifying upstream crates #6

jethrogb opened this issue Mar 7, 2018 · 6 comments
Labels

Comments

@jethrogb
Copy link
Collaborator

jethrogb commented Mar 7, 2018

Inevitably, you'll come across a crate which requires minor patches to be
compatible with another platform. Currently there are two options to deal with
this situation:

  1. Send patches adding platform support upstream
  2. Require downstream users of your create to use your fork

This issue proposes finding a middle ground between these options in case
upstream is not cooperating.

@Ericson2314
Copy link
Collaborator

I'm not sure there exists such a good middle ground, but it would be cool to be wrong! As it stands, I think our goal should be to make the situation good enough that there's no reason that upstream wouldn't take the patch. [patch] in Cargo ought to work well enough that the second case isn't so bad until they do.

@jethrogb
Copy link
Collaborator Author

jethrogb commented Mar 7, 2018

One (probably bad) idea I had is to allow [patch] statements to trickle up the dependency tree.

@Ericson2314
Copy link
Collaborator

What do you mean by that?

@jethrogb jethrogb added cargo std and removed std labels Mar 7, 2018
@jethrogb
Copy link
Collaborator Author

jethrogb commented Mar 7, 2018

I guess I hadn't really thought it through. Maybe better is if you could specify [patch] sections per target in your cargo config?

@pierzchalski
Copy link
Collaborator

The alternative being to do some target-specific [cfg]s in your patched version?

@jethrogb
Copy link
Collaborator Author

Related rust-lang/rfcs#2624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants