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

Update std.traits to reflect renaming of TypeTuple to AliasSeq #3756

Closed
wants to merge 3 commits into from
Closed

Update std.traits to reflect renaming of TypeTuple to AliasSeq #3756

wants to merge 3 commits into from

Conversation

jamadagni
Copy link
Contributor

I have separated the changes into two commits. Please see the commit messages for more details on the changes.

@JackStouffer
Copy link
Member

Merge failed, please rebase.

@andralex
Copy link
Member

rebase pliz

@Hackerpilot
Copy link
Member

@jamadagni Please rebase this pull request. If you do not know what this means, you can read this: http://wiki.dlang.org/Starting_as_a_Contributor#Rebasing

@jamadagni
Copy link
Contributor Author

Hello. Sorry for the delay. Was busy with other things. Will do this within
a couple of days.
On 2 Dec 2015 04:35, "Brian Schott" notifications@github.com wrote:

@jamadagni https://github.com/jamadagni Please rebase this pull
request. If you do not know what this means, you can read this:
http://wiki.dlang.org/Starting_as_a_Contributor#Rebasing


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

@jamadagni
Copy link
Contributor Author

I need some help here. I have pulled the upstream updates to my local clone (which is however of my fork of the official Phobos repo), and I have done the git rebase master merge work. However I'm trying to push and getting an error:

$ git remote -v
origin  https://github.com/jamadagni/phobos.git (fetch)
origin  https://github.com/jamadagni/phobos.git (push)
upstream        https://github.com/D-Programming-Language/phobos.git (fetch)
upstream        https://github.com/D-Programming-Language/phobos.git (push)
$ git co master
Switched to branch 'master'
Your branch is up-to-date with 'upstream/master'.
$ git lg -n5
61b07a3 Merge pull request #3856 from BBasile/mallocator-nogc
0816ad6 Merge pull request #3598 from tsbockman/issue_14786
4b690ef Added a slower generic fallback method, in case real.mant_dig > 64.
7929a45 Optimized slightly and made the unittests more generic in case real.mant_dig < 64.
0186099 Added static assert documenting the maximum precision for which this fix is valid.
$ git co remove_typetuple
Switched to branch 'remove_typetuple'
$ git lg -n5
9f1bc48 std.traits: other minor cleanups for better readability
bdbfdbb std.traits: big cleanup; remove remaining references to old TypeTuple terminology
3f2e260 std.traits: replace all instances of TypeTuple with AliasSeq
61b07a3 Merge pull request #3856 from BBasile/mallocator-nogc
0816ad6 Merge pull request #3598 from tsbockman/issue_14786
$ git push origin remove_typetuple
To https://github.com/jamadagni/phobos.git
! [rejected]        remove_typetuple -> remove_typetuple (non-fast-forward)
error: failed to push some refs to 'https://github.com/jamadagni/phobos.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
$

From looking at https://github.com/jamadagni/phobos/commits/remove_typetuple it seems that the problem is because my online branch is still based on a past commit of upstream whereas my local clone is based on the latest upstream. I'm not sure how to make my online copy sync with my local clone. Please advise.

@burner
Copy link
Member

burner commented Dec 7, 2015

you want to do git rebase upstream/master where upstream is dlang/phobos. After you validate that your commits are on top of the current master branch commit you need to git push --force to your branch.

… terminology

changed imports to use std.meta i.o. std.typetuple
rename names ending in "Tuple" or "List" by using plural of preceding word or replacing by Seq.
rename unclear names "Parameters" and "Fields" to refer to "Types" since we have "Identifiers" of the same also.
add deprecated tags to all aliases referring to the old names in all cases above.
add deprecated tags to the typetuple module and alias.
changed references to "function" to "callable" wherever the template was testing for isCallable.
move description of callable to "isCallable" only.
minor typo corrections.
@jamadagni
Copy link
Contributor Author

What's going on? I'm seeing a "build failed" error with the log showing a problem with a file that's not modified in this PR at all:

../dmd/src/dmd -conf= -m64 -w -c -o- -version=StdDdoc -I../druntime/import  project.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/macros.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/html.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/dlang.org.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/.generated/2.069.2.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/std.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/std_navbar-prerelease.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/.generated/modlist-prerelease.ddoc /home/dtest/DAutoTest/work/repo/dlang.org/nodatetime.ddoc -Df/home/dtest/DAutoTest/work/repo/dlang.org/web/phobos-prerelease/std_math.html std/math.d
std/range/primitives.d(335): Error: static assert  "Cannot put a char into a LockingTextWriter."

@tsbockman
Copy link
Contributor

@jamadagni

What's going on? I'm seeing a "build failed" error with the log showing a problem with a file that's not modified in this PR at all:

It took a while to track down (the second commit in this PR is huge), but here it is:

You forgot to add a deprecated alias for Parameters when you changed the name - possibly because there is already an older deprecated alias. This belongs somewhere around line 950:

/**
 * Alternate name for $(LREF ParameterTypes), kept for legacy compatibility.
 */
deprecated alias Parameters = ParameterTypes;

Once you fix that, you will also need to change this (around line 1060):

static assert(PSC!noparam.length == 0);

To this:

static assert(ParameterStorageClasses!noparam.length == 0);

After that it should compile, and pass all unit tests. (You may need to rebase first, though.)

However, it will also spam the compiler log with lots of deprecated messages from users of Parameters, many in std.stdio. In particular, Parameters is used by LockingTextWriter; that's why it's mentioned in your compiler error.

Unfortunately, the fairly straightforward error message generated by the undefined reference to Parameters in LockingTextWriter itself was masked by some CTFE logic in std.range.primitives.put(), hence your confusion.

@wilzbach
Copy link
Member

wilzbach commented Mar 6, 2016

  1. why don't you add a deprecation removal date? E.g. sth like
deprecated("It will be removed from Phobos in June 2016. Use std.meta") module std.typetuple;
// @@@DEPRECATED_2016-06@@@
  1. I already bumped into this issue - it would be nice to get std.typetuple deprecated soon!

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

@jamadagni
Copy link
Contributor Author

Hi I have an exam coming up and so slow to respond/work on this. Will do so next week. Thanks for your patience.

@DmitryOlshansky
Copy link
Member

@jamadagni Ping!

@DmitryOlshansky
Copy link
Member

Hi I have an exam coming up and so slow to respond/work on this. Will do so next week. Thanks for your patience.

@jamadagni I hope you are doing well. Any chance to resurrect this work? Thanks!

@wilzbach
Copy link
Member

@jamadagni I hope you are doing well. Any chance to resurrect this work? Thanks!

ping @jamadagni

@wilzbach
Copy link
Member

I adopted this orphaned PR:
#4954

@wilzbach wilzbach closed this Dec 13, 2016
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.

9 participants