-
Notifications
You must be signed in to change notification settings - Fork 284
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
Sink serialization: Do not provide the type explicitly #2498
Conversation
Let IFTI do its thing, as it needs to for 'auto ref'.
Hm, nothing to do with the changes in here, but the "sink serialization" as it stands still looks a bit strange to me. Shouldn't it just support the same range based Sorry for coming up with this now, I briefly saw the two PRs, but didn't manage to look through them in time. On a related note, #2493 and #2495 appear to have been merged without a merge commit, which makes it hard to track it back to their PRs. We should avoid that and should just require the branch to be rebased before the merge instead if it is too out of date. |
Using
No worries, I went ahead with the knowledge that you might come in and provide an alternative if it really wasn't working :)
I'm not sure I follow ? You can see the PR from the commit in Github UI: d5d47d1 (you see which branches it's in, which tags, and the PR that introduced it). Obviously, if you prefer merge commit, I'll go back to that, but be aware that it's also dlang-bot default nowadays (when the PR has a single commit). |
Yeah, sure, what I actually meant was to support all applicable variants, although I worded that poorly.
But that's only for the case where the serializer doesn't support sink delegate based strings. It might in theory make certain structs use BTW, I managed to watch your talk "live" with one ear, but missed a few parts. I have quite a number of places in mind where it would really help, though (
It may still be visible in the GitHub UI, but not in the repository (log) itself. I almost always rely on the latter and being forced to go through the web interface would be rather annoying. Also, this knowledge is lost as soon as this isn't hosted on GitHub anymore (who knows how things change). Another benefit is that there is a history of merge commits that are known to pass the tests, whereas intermediate commits in a branch may actually fail, making bisecting more difficult. I agree that a linear history is nice, though, and what we use internally is forcing a linear history of merge commits, which IMO is a quite acceptable middle ground, but AFAIK GitHub doesn't support that. |
Because that's the best way to compose. You can intercept in the delegate and do whatever you want. You can even write directly to a socket, bypassing any intermediary buffer. You can write to multiple destinations at once, etc... |
For example having it mentioned in the change log, also the important information is all in the commit itself - author, merger, merge date, PR description. Discussion comments and other GitHub-only things would have to be backed up separately, of course.
Yeah, but doesn't that specifically disable the possibility to emit merge commits? I though that I had tried that once, but I'm not completely sure. What I'm after is this:
and only disallow this:
|
I was thinking of a case like this:
|
Well in this case there's little use for it, because the caller can do this itself. But that's a very rare case. If |
I guess that depends on your workflow, but in order to have it in the changelog, I still do the commit => PR things online. But if you want to do everything from the command line, that might make things a bit more annoying.
Aside from the PR description (which should be the commit message), it's all there too: $ git show --pretty=fuller d5d47d15
commit d5d47d15ca36fc824bfbc0b7520f0535419e2d5a
Author: Daniel Graczer <[email protected]>
AuthorDate: Thu Nov 12 09:14:24 2020 +0100
Commit: Mathias LANG <[email protected]>
CommitDate: Mon Nov 23 15:41:38 2020 +0100
Added sink type toString to the serialization
This change should reduce the number of memory allocations when using toString custom serialization
[...] But okay, I'll make sure to use
The closest you can come to is "Require branches to be up to date before merging". But IMO that nullifies one big advantage of having a DVCS in the first place . |
Merging this, since it fixes a bug. Will use the |
BTW, @dlang-bot adds |
That'd be great. Now we just need to raise a PR (or at least, an issue so it isn't forgotten) |
At work we use exclusively fast-forward-only, as the idea is that before merging each developer needs to rebase on the |
@Geod24 there you go: dlang/dlang-bot#262. Feel free to update the description. |
Okay, so in that case, if the serializer supports the sink approach, it will use that overload to avoid allocations, only if that's not the case
I don't get that. You want to rebase everything directly on top of (say) master. Why would rebasing and having an additional merge commit suddenly nullify any DVCS advantages? edit: The only difference I can see is that the first case is directly supported by GitHub using the "rebase and merge" button, while the second one needs to be done manually by the contributor (in contrast to GitLab). But aside from that question this indeed seems to be the setting that I was searching for. I overlooked that completely, probably because it is oddly placed above the status check list. |
DVCS are great at parallelizing work. Remember the days of SVN ? I do, and it wasn't great to collaborate. OTOH, having the contributor to rebase has the opposite effect, it creates "choke points". I still use merge commits BTW, because I don't trust most people to make truly atomic commits (commits that address a single concern, compile, and will pass the test-suite). But for single-commit PRs, that's not an issue. |
I agree, at least from an open source perspective, that this is a problem for contributors to a certain degree. For that reason I usually don't ask for it, if a branch is just slightly outdated. But it would be really nice if that "rebase and merge" button could just be configured to create a merge request. Having a "rebase now" button like GitLab has would also solve this. Yeah, but SVN was really not great for parallel work and branching. But it did have a certain merit to always have a single source of truth (not saying that this outweighs its disadvantages in any way, though). |
Let IFTI do its thing, as it needs to for 'auto ref'.