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

Fixed xfail for nbody shootout benchmark by correcting command line pars... #10410

Merged
merged 1 commit into from
Nov 13, 2013

Conversation

willingc
Copy link
Contributor

...e.

Cleaned up unneeded imports and type changes to resolve compiler warnings.

Work in process

@@ -44,7 +44,7 @@ fn roundtrip(id: int, n_tasks: int, p: &Port<int>, ch: &Chan<int>) {
return;
}
token => {
info!("thread: {} got token: {}", id, token);
info!("thread: {id} got token: {token}");
Copy link
Member

Choose a reason for hiding this comment

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

I have a feeling this isn't correct. It should probably either be left unchanged, or written as info!("thread: {id} got token: {token}", id=id, token=token);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback. I will check in the morning. Compiler warned on either mac osx or ubuntu -- can't remember which -- when left as is. Will double check on both systems. Either way, your suggestion above makes good sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huonw, I get a compiler error if written as info!("thread: {} got token: {}", id, token); or as suggested info!("thread: {id} got token: {token}", id=id, token=token);

error too many arguments to fmt! found 3, expected 1

I believe that the info! is using fmt! instead of format!. Please advise on how to correct. Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Hm, that's a little peculiar... fmt! is no longer in the main codebase (well it is, but it emits an error and stops compilation). Maybe you need to pull from mozilla/master and rebase on top of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huonw, ubuntu system was compiling using 0.8. Removed 0.8 from system and reinstalled pre-0.9. Compiles cleanly now with original info! format.

Copy link
Member

Choose a reason for hiding this comment

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

Awesome!

Copy link
Member

Choose a reason for hiding this comment

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

Oh, also, could you squash the commits together? (Just so there's not a "ghost" change that is added in one commit and removed in the next.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

huon, I tried to do the rebase -i and squash the commits together, but got lost in the land of git. Any suggestions on getting out of the muck of confusion? Thanks :)

@huonw
Copy link
Member

huonw commented Nov 12, 2013

The easiest way to fix this (that I (a non-git expert) know of) is probably to:

  • create a new branch from mozilla/master, say, shoot-done-2
  • git log to be able to compare later (will just be a check to see it all worked ok)
  • run git cherry-pick bc584ea (that's (a prefix of) the hash of the commit that you want) to copy that commit on to shoot-done-2.)
  • git log to check that everything is in order (that is, it should be your commit first and then the same sequence as from the first git log)

Then, if it is as you expect, you can either open a new PR from that new branch and close this one if you do (which is perfectly ok), or:

  • checkout the old branch (i.e. shoot-done)
  • run git reset --hard shoot-done-2 which will (destructively!*) update the current branch (shoot-done) to point to the clean version (i.e. shoot-done-2)
  • push the new clean version of shoot-done to your github fork, which should update this PR. (it will require a force push, i.e. git push -f origin shoot-done, where origin is the name of your own github remote repo.)

*It's not entirely destructive, one can use git reflog to recover the most recent commits to which a branch pointed.

For what it's worth, a "correct" procedure for just squashing the last two commits would be something like:

$ git rebase -i HEAD^^
# either 's'/'squash' or 'f'/'fixup'

the HEAD^^ means two commits above the tip of this branch (it could also be HEAD~2, or master if the branch was forked from master).

(Just guessing, it looks like you may have run git pull which merged your remote branch into your local branch, and caused confusion. In general, running either git fetch and manually rebasing/merging (e.g. git fetch mozilla git rebase mozilla/master to rebase a branch on top of the main master branch), or running git pull --rebase will have more controlled behaviour... at least, in my experience, I don't get tied up in knots so much when I avoid plain git pulls.)

(My apologies if this is aimed too high or too low, I don't have much context for your git experience. I'm happy to tune it either way, just ask.)

@huonw
Copy link
Member

huonw commented Nov 12, 2013

Also, there's no guarantee my instructions are 100% correct :( ... feel free to ask here or in IRC if things go awry again; I'm sure there'll be someone who can help. (Thanks for preserving with this.)

@willingc
Copy link
Contributor Author

huon, thank you for the very detailed instructions. I think that things are now back how they should be - stuff squashed and cleaned up. I appreciate the time you took to coach me through this one :)

@huonw
Copy link
Member

huonw commented Nov 12, 2013

Not a problem at all.

Now this PR needs a rebase, so, something like git pull --rebase mozilla master (where mozilla is the name for the github.com/mozilla/rust remote).

…arse.

Cleaned up unneeded imports and type changes to resolve compiler warnings.
@willingc
Copy link
Contributor Author

Did the suggested rebase and then did git push -f origin shoot-done

Was that correct? [Thinking that I need to do some reading and drawing out of the the flow between the repos when doing rebase and pull, push, etc.]

I'll get it sooner or later. It's easier for me to grasp the visual flow vs. the commands ;)

bors added a commit that referenced this pull request Nov 12, 2013
...e.

Cleaned up unneeded imports and type changes to resolve compiler warnings.

Work in process
@huonw
Copy link
Member

huonw commented Nov 12, 2013

Looks correct to me!

I found http://pcottle.github.io/learnGitBranching/ a neat way of visualising git branches/trees/commits and learning (& practising) the various commands for manipulating them.

@willingc
Copy link
Contributor Author

You rock!

I will check out your suggestion later this evening :)

@bors bors closed this Nov 13, 2013
@bors bors merged commit 33ee433 into rust-lang:master Nov 13, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 10, 2023
Downgrade let_underscore_untyped to restriction

From reading rust-lang#6842 I am not convinced of the cost/benefit of this lint even as a pedantic lint.

It sounds like the primary motivation was to catch cases of `fn() -> Result` being changed to `async fn() -> Result`. If the original Result was ignored by a `let _`, then the compiler wouldn't guide you to add `.await`. **However, this situation is caught in a more specific way by [let_underscore_future](https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future) which was introduced _after_ the original suggestion (rust-lang#9760).**

In rust-lang#10410 it was mentioned twice that a <kbd>restriction</kbd> lint might be more appropriate for let_underscore_untyped.

changelog: Moved [`let_underscore_untyped`] to restriction
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 5, 2023
…lp_message, r=Manishearth

Improve the help message + add a help span

This would close rust-lang#10410, because it applies the general consensus achieved in that issue (that replacing `let _ = ...` to `_ = ...` doesn't present any benefits).

I also added a little help message span.

changelog:[`let_underscore_untyped`]: Fix the help message confusion + add a help message span.
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.

3 participants