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

fix Issue 15272 - [2.069-rc2,inline] nothing written to output when -… #5253

Closed
wants to merge 1 commit into from

Conversation

WalterBright
Copy link
Member

…inline is set

https://issues.dlang.org/show_bug.cgi?id=15272

Not sure at the moment how to create a test case for it.

@MartinNowak
Copy link
Member

Regression fixes always against the stable branch please.

e2->E1 = eb;
e2->E2 = e;
e2->E1 = e;
e2->E2 = eb;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does switching the assignment order help?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the two leaves are executed in the same order as in the OPpair expression node.

@WalterBright
Copy link
Member Author

Evidently, this is not the answer, either:

core.exception.AssertError@std/encoding.d(269): unittest failure

@WalterBright
Copy link
Member Author

Hah! Turns out that safety0ff.bugz was on the right track, but there was yet another bug that needed to be fixed to get all this to work.

@WalterBright
Copy link
Member Author

Added test cases.

@WalterBright
Copy link
Member Author

I've tried setting it against another branch, and have failed. Besides, I still don't understand what's wrong with cherry-pick. I use it all the time to put improvements into the D1 branch. And in any case, PRs on the release branch have to be cherry-picked back into HEAD anyway. So I simply don't understand the problem.

@aG0aep6G
Copy link
Contributor

aG0aep6G commented Nov 3, 2015

test15272 passes without the fix, too.

@WalterBright
Copy link
Member Author

The test failing relies on the contents of an uninitialized variable, hence the weird constructs in the bugzilla report. There's not really a reliable way to make it fail - however, test15272 should always pass.

@CyberShadow
Copy link
Member

I've tried setting it against another branch,

  1. When you start making the changes, instead of starting from the latest master start from the latest stable.
  2. When you create the PR on GitHub, there will be a branch dropdown. Just choose stable. You should then see only your own commits in the list.

and have failed.

This non-specific complaining isn't helping anyone.

Besides, I still don't understand what's wrong with cherry-pick.

Many things. This has been discussed many, many times. There is no need to pretend this is a new topic or problem.

@WalterBright
Copy link
Member Author

What was never answered is why merging commits from stable to master is good but merging commits from master to stable is bad. What's the difference?

@CyberShadow
Copy link
Member

What was never answered is why merging commits from stable to master is good but merging commits from master to stable is bad. What's the difference?

Merging is not the same as cherry-picking. The question to ask here is what the advantage of merging is over cherry-picking. With cherry-picking, the commit is duplicated (essentially copied and pasted) into a new branch, which causes two distinct commits with the same set of changes to exist in D's history. This causes confusion and problems for tools such as Digger.

We can't merge master into stable because aside from bringing in the regression fix, it would also pull in all unstable commits made on the master branch that don't belong in stable. As such, the only options are to either cherry-pick (which has the problems mentioned above) or to make the pull request against the stable branch in the first place.

Hope this helps! Happy to clarify if something else is not clear.

@WalterBright
Copy link
Member Author

Thanks for the explanation. So what happens if a fix is made to stable only, and is not meant for master?

Also, why not fix Digger?

@WalterBright
Copy link
Member Author

When you start making the changes, instead of starting from the latest master start from the latest stable .

mercury ~/forks/dmd> git checkout stable
error: pathspec 'stable' did not match any file(s) known to git.

I thought my git fork contained everything.

@CyberShadow
Copy link
Member

Thanks for the explanation. So what happens if a fix is made to stable only, and is not meant for master?

It can be undone as part of the stable-to-master merge PR. But has such a situation arisen before?

Also, why not fix Digger?

It is a complicated problem. Digger would need to search D's history for similar commits, and it would need to make assumptions about the structure of the repository's history. But this isn't the only issue caused by cherry-picking.

I thought my git fork contained everything.

That's strange. Do you see origin/stable when you run git branch -r?

@WalterBright
Copy link
Member Author

But has such a situation arisen before?

It will.

@WalterBright
Copy link
Member Author

Do you see origin/stable when you run git branch -r ?

I see:

  ...
  origin/simplify-strings
  origin/size_t_error
  origin/speed_up_search
  origin/splitpair
  origin/staging
  origin/statement-errors
  origin/std-mangle2
  origin/std-mangling
  origin/strictalias
  origin/stringbloat
  origin/stringexp
  origin/stripParams
  origin/sync
  ...

@CyberShadow
Copy link
Member

Ah, origin is your fork. Okay. Do you know the remote name for the D-Programming-Language/dmd repo? It'll be in the output of git remote -v.

@WalterBright
Copy link
Member Author

mercury ~/forks/dmd> git remote -v
origin  git@github.com:WalterBright/dmd.git (fetch)
origin  git@github.com:WalterBright/dmd.git (push)
upstream        git@github.com:D-Programming-Language/dmd (fetch)
upstream        git@github.com:D-Programming-Language/dmd (push)

@CyberShadow
Copy link
Member

OK, this will set up the stable branch for you:

git fetch upstream
git branch --track stable upstream/stable
git checkout stable

@WalterBright
Copy link
Member Author

2.When you create the PR on GitHub, there will be a branch dropdown. Just choose stable .

Stable is not in the dropdown list.

@CyberShadow
Copy link
Member

Sorry, I should've been more specific, forgot there's like 4 dropdowns.

This one:


@WalterBright
Copy link
Member Author

There is no "base fork:" nor a "head fork:" or "base: master" on mine. There's only "Branch: master".

@CyberShadow
Copy link
Member

Oh, that's on a different page.

Do you see a button like this on https://github.com/WalterBright/dmd ?

If so, click the green button and you'll get to the page in the above screenshots. If not, select your pull request's branch (fix15272b I guess) and click the button.

(BTW, this is the same as how one would normally do a PR against master. I guess you've been using some other way?)

@MartinNowak
Copy link
Member

main reasons to avoid cherry-picking:

  • copy&pasting commits creates lots of conflicts when merging stable into master
  • makes it very hard to track which fix is in which branch, and subsequently we "forgot" a number of fixes in the past releases
  • ultimately the person creating a PR has to suggest which branch to target, everybody has to
    get involved at least a bit in making the next release to scale our development process

Thanks for the explanation. So what happens if a fix is made to stable only, and is not meant for master?

We'd still merge it into master and revert/change the fix then.

See #5258 for the rebased PR.

@MartinNowak MartinNowak closed this Nov 3, 2015
@WalterBright
Copy link
Member Author

The trouble seems to be that my fork does not contain 'stable'. I do not know how to make it do that.

@yebblies
Copy link
Member

yebblies commented Nov 4, 2015

git fetch upstream
git push origin stable

@CyberShadow
Copy link
Member

Your fork doesn't need to have a stable branch. Why do you think that your fork must have a stable branch?

@WalterBright
Copy link
Member Author

Because github wouldn't list stable as something I could put a PR against. As described upthread.

@WalterBright
Copy link
Member Author

Thanks, @yebblies

@CyberShadow
Copy link
Member

I think you're looking in the wrong place. Look at the screenshots I posted.

Can you post a screenshot yourself?

@CyberShadow
Copy link
Member

My dmd fork doesn't have a stable branch, but that doesn't prevent me from creating PRs that target stable. I'm pretty sure you're on the wrong track here. @yebblies Can you explain why you posted those commands?

@yebblies
Copy link
Member

yebblies commented Nov 5, 2015

@yebblies Can you explain why you posted those commands?

Alien mind control.

@CyberShadow
Copy link
Member

Oh, OK. Carry on then :)

On Thu, Nov 5, 2015 at 4:40 AM, Daniel Murphy notifications@github.com
wrote:

@yebblies https://github.com/yebblies Can you explain why you posted
those commands?

Alien mind control.


Reply to this email directly or view it on GitHub
#5253 (comment)
.

@WalterBright
Copy link
Member Author

Can you post a screenshot yourself?

I removed it. But there was one dropdown, not 4, and it is as I said. No stable branch.

@CyberShadow
Copy link
Member

Then you're on the wrong page. Read my comments above.

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

Successfully merging this pull request may close these issues.

5 participants