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

Simple.SrcDist cleanup (fixes #3656) #3702

Closed
wants to merge 104 commits into from
Closed

Simple.SrcDist cleanup (fixes #3656) #3702

wants to merge 104 commits into from

Conversation

fmaste
Copy link
Collaborator

@fmaste fmaste commented Aug 17, 2016

  • The PackageDescription is not changed any more, just the pieces of it we need to (see preprocessComponentSdist).
  • Created filterAutogenModules and filterAutogenBuildInfo functions so given a PackageDescription and BuildInfo returns filtered answers. Now is clear where to add an autogen-c-sources field.
  • Created sdistSourcesList and sdistSourcesDirectory functions moving the logic out of frontend sdist where this last one just reads the flags and prints messages.
  • findSetupFile, findMainExeFile and two pieces of code from listPackageSources where identical, extracted all on findMainFile (You can see through the commits how it is done step by step).
  • Renamed not exported functions so now we have findModulesFiles, findMainFile, findIncludeFile and findSetupFile together.
  • TODO: verbosity variable of sdistSourcesList, sdistSourcesDirectory goes to listPackageSources then listPackageSourcesOrdinary that calls defaultPackageDesc verbosity that ignores it. But listPackageSources is exported and is too much for a single PR.

There are a lot of commits because it's the only way to make small steps to figure all this out and test between every change. Dont worry I will merge --squash! but before you can see that I tried hard not to break anything.

@23Skidoo
Copy link
Member

I don't think we should tell people what their workflow should be, as long as it doesn't interfere with other people working on the project ;)

Spurious merge commits pollute history and make it harder to do code review, that's why we care about them.

@ezyang
Copy link
Contributor

ezyang commented Sep 16, 2016

Yes, but @fmaste has already stated that he will merge squash before pushing to master (IIUC, that will be a merge, then a git rebase -i which will result in a single commit with no merges) so no problem right :)

On September 16, 2016 6:40:14 PM GMT+09:00, Mikhail Glushenkov notifications@github.com wrote:

I don't think we should tell people what their workflow should be, as
long as it doesn't interfere with other people working on the project
;)

Spurious merge commits pollute history and make it harder to do code
review, that's why we care about them.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#3702 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@23Skidoo
Copy link
Member

Yeah, it's no problem in this case, but in general merge commits make it harder to do code review, so it's nice to get rid of them before submitting a PR.

@ezyang
Copy link
Contributor

ezyang commented Sep 16, 2016

No, I don't see how merge commits necessarily cause problems at review time. For example, GitHub suppresses the diff if the merge is "clean". Very rarely git will mess up an "obvious" textual merge. But that's what looking at the final diff is for.

If the merge is dirty, well, it is true that it is "easier" to review patches if the various bits of the merge have been backported back. I do this for my own patchsets. But it is extremely tedious and time consuming. I wouldn't wish it on anyone else. For example, for this patchset, I reviewed it by just clicking on "Changed files" overall and looking at the changes.

@fmaste
Copy link
Collaborator Author

fmaste commented Sep 19, 2016

You certainly can! :) There are at least two ways I can think of ...

Everything is possible with git but no thanks, sounds like a recipe for disaster

@23Skidoo @BardurArantsson, I don't think we should tell people what their workflow should be, as long as it doesn't interfere with other people working on the project ;)

As I'm doing some refactoring I do little non-destructive changes with a silly commit description just to identify them when looking at the history. At all time I test locally and if something fails I cherry pick and correct.

Yeah, it's no problem in this case, but in general merge commits make it harder to do code review, so it's nice to get rid of them before submitting a PR.

Nobody else is working on this branch and the merge is not shown on the diff. After squashing all to master the result will be the same as rebasing and I can delete this branch. The only problem I see is that you have to skip merges if you are looking at every commit separately, but I doubt somebody is doing that with all this commits

@ezyang
Copy link
Contributor

ezyang commented Sep 19, 2016

@fmaste You're all good. Squash and push!

@23Skidoo
Copy link
Member

23Skidoo commented Sep 19, 2016

@ezyang

For example, GitHub suppresses the diff if the merge is "clean".

It only recently started doing that. Not sure how well it works for "dirty" merges.

I do this for my own patchsets. But it is extremely tedious and time consuming. I wouldn't wish it on anyone else.

I sympathise, but this is essentially an argument for not removing merge commits at all.

For example, for this patchset, I reviewed it by just clicking on "Changed files" overall and looking at the changes.

It works in this case, but in general not having everything rolled up in one giant commit and using logical commits instead of historical makes the reviewer's life easier.

@23Skidoo
Copy link
Member

@fmaste Are you going to update this PR? This is basically good to go, just needs to be squashed and have some minor conflicts resolved. Anything we can do to help?

@ezyang
Copy link
Contributor

ezyang commented Oct 25, 2016

@23Skidoo Maybe we should just squash and push ourselves.

@23Skidoo 23Skidoo modified the milestones: 2.0.1, 2.0 Feb 17, 2017
@23Skidoo 23Skidoo modified the milestones: 2.0.1, 2.0.2 Sep 19, 2017
@23Skidoo 23Skidoo modified the milestones: 2.0.2, 2.4 Aug 29, 2018
@23Skidoo 23Skidoo modified the milestones: 2.4, 2.4.1 Sep 17, 2018
@23Skidoo 23Skidoo modified the milestones: 2.4.1.0, 2.4.2.0 Apr 26, 2019
@phadej phadej modified the milestones: 2.4.2.0, 3.4 Nov 27, 2019
@phadej
Copy link
Collaborator

phadej commented Jan 22, 2020

I assign this to @ezyang to squash and push

@phadej
Copy link
Collaborator

phadej commented Jan 22, 2020

This PR contains some good stuff, but it cannot be merged as is. v2-sdist doesn't (and will not) run configure beforehand.

@phadej phadej assigned phadej and unassigned ezyang and fmaste Jul 20, 2020
@phadej
Copy link
Collaborator

phadej commented Sep 3, 2020

sdist code have changed, and some changes are there now.

@phadej phadej closed this Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants