-
Notifications
You must be signed in to change notification settings - Fork 6
Several fixes, in separate commits #2
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
Conversation
th-otto
commented
Sep 28, 2017
- Allow prefix for cross-tools to be overridden
- Fix "make clean" to remove objects in sub-directories
- Clean up assembler code to use % prefix for register names
- Simplify aes/vdi entry points
- Fix dereferences of type-punned pointers
- Fix filemodes
Just a suggestion, maybe "Clean up assembler code to use % prefix for register names" should be a separate PR. Also, some of the fixes are already present in #1 |
Can't you just cherry-pick that commit when merging? That would be easier, since at least one the other commits patches the same source files.
Yes, sorry. Only noticed that when i was already done with it. |
Sure, cherry pick works, it's just not as easy as pushing the "merge pull request" button. :-P (now I think about it, I'm not sure how to do this easily at all -- there is some obscure way how to get git url of this PR but it's really not meant to be used like that). Anyway, it's up to @Landemarre, @arnaudbercegeay or @atic-atac to decide on this I guess. |
But it is really important to have a separate PR then? When merged, there will be separate commit for it, no matter where it came from. PS.: looking at the travis log, i see something like |
PR: but if you merge it via the web ui, you can't (shouldn't) mess with commits anymore, it's pushed. CC: Yeah, that's some kind of Travis feature, to show you your current environment (as I set CC to m68k-atari-mint-gcc in .travis.yaml) but as you have noticed, not exactly useful in this case. |
Oh, does that come from the compiler: entry? Then i suggest to remove that, the compiler should be figured out by the configure script when cross-compiling. Also, only setting CC is nonsense when compiling libraries, you will also have to set at least AR and RANLIB accordingly
What i mean is, there is no difference in the commits of the master branch once you have merged both PRs. It would only make a difference when you want to omit one of the commits when merging. |
I may remember that wrong but I think when I didn't set it, Travis forced its own value there (gcc vs. clang), i.e. making the situation even worse because then our projects (freemint, mintlib etc) refused to compile. PR: I totally get it but I had a different situation in mind, in case that people wont like the transition to %% prefixes. In that case you'd end up with a tree with all your commits (incl. the prefix one) and you would have to either revert it or force-push without it. Btw the merges: it doesn't have to be like this. Maintainer has an option to use 'rebase', i.e. first merge master back to PR, rebase the change on top of it and fast-forward it back to master. The approach is discussed here: freemint/freemint#26. |
In the travis log i just noticed: ../inline.rsh:7:20: fatal error: portab.h: No such file or directory Shame on me, this is due to an include portab.h at the top that file, generated by ORCS. i was quite sure that such a file exists for mintlib/gemlib, but apparently this isn't the case anymore. Will fix that soon. But there is also a problem with the build script, it nevertheless writes: The command "sh ./.travis/build.sh "${PWD}/.travis/tmp" "${PWD}/.travis/out"" exited with 0. |
Regarding the commits: you would still be able to revert single commits if need be. Only because they all come from the same branch, does not mean they are treated like a single commit (unless you squash them together when merging). I also don't think that is a matter of taste to use % prefixes or not, without them you won't ever be able to compile it with newer versions of gcc. And since some of them also appear in public header files, that is not only a matter which compiler is used to compile the library, but also which compiler the user uses to compile her application. So actually, you could consider that as bug fix. |
Well, the ELF flavour of it. That's the basic question here, if everyone agrees the ELF 'middle man' is the future, you're right. Thanks for bringing the travis issues to my attention, the script is indeed buggy: calling |
Not only. Sooner or later this will be mandatory for all targets. And with gcc 7.x (or actually also some older versions) this is already mandatory for inline asm, because you otherwise have conflicts with positional parameters. And inline asm is used a lot in all those trap_xxx macros. |
Needs cleanup, one functionality per PR. |
That does not work with the PR system. We had that already. If i put every commit on a separate branch, each commit has to be rebased against master, or the PR does not merge. But if you then merge the first PR, others will not apply anymore, since they affect the same files (not all of them, but some). If at all possible, just think of each commit as being a separate PR. Once merged, they will appear as separate commits anyway in the history. |
Not necessarily true. Don't tell me that 'make clean' fixes collide with the register prefix changes. PR doesn't merge only in case of a conflict (changing the same lines), so changing the same file is totally fine. git is quite smart.
This is not the point of a PR (or a merge commit in general) -- you want to be able to step back and bisect between merge commits (PRs), not the branches they are merging. If it helps, look at the PR as a separate patch: https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html#split-changes -- it's totally OK to say "this one depends on that one" but IMHO it should have a good reason. Anyway, I'm just providing hints, to increase the chance of merging your stuff, I'm not saying all I write here is universal truth. :) But the truth is that there's 175 files changed, labeled as "several fixes" and if there's a regression, the person who will be doing bisection will certainly love you. :) |
No of course not. Sure that could be put on a separate PR. But see my problem here: i make up a branch for it, add that commit, then make a PR for it. Then i switch back to master, make a new branch for implementing the next patch. Now i have a clean branch again, but without the fix from the other branch...
But you can still do that. They are still separate commits. I don't see a problem here.
Most of them from the one that fixes the filemodes only. I did not change any content there, only removed the executable bit from source files. |
But nobody stops you from creating your own branch with everything. You are even free to use your current (PR-1) branch for whatever you want. Just create spin-offs from master for each functionality: make changes, register prefix changes, vdi/aes changes, file mode changes, ... you don't have to even look at them anymore, just keep them in origin until merged. Cherry-pick is your friend. ;)
Exactly my point. You want the maintainer to look at a PR, make him realise there's only 175 changed file modes, nothing else, boom, committed. Now there's the prefixes, vdi changes, pointer changes, ... if he doesn't like some of it, then what? Your whole set is blocked and nothing gets committed. Even if you correct it, he AGAIN has to look at all of the 175 file changes because he can't know what commits you have force-pushed, changed or added. See, it quite makes sense to separate things. |
On Mittwoch, 1. November 2017 04:22:11 CET Miro Kropacek wrote:
Cherry-pick is your friend. ;)
I don't think so. cherry-picking will create a new object in the history, with
the same changes. And when there are merge conflicts, it will create another
extra merge commit. And it will make keeping track of which commits are
applied in which branch almost imposssible. How am i supposed to know which
commits i have already cherry-picked, when getting back to that branch a few
weeks later?
If he doesn't like some of it, then what? Your whole set is blocked
Well thats a point of course. Isn't there a way to "cherry-pick" the commits
from the PR when merging? ie only merge those where he sees no problem, and
reject the others?
|
Perhaps others can share their experience, what I usually do is:
Not that I am aware of. |
@th-otto I suggest to keep "Clean up assembler code to use % prefix for register names" commit as a separate PR (same as freemint/mintlib#28 is) before it's 100% agreed and commit the rest. |
Applied now, except for the register names patch. I'll open an issue for it, since the original patch does not apply anymore |