Skip to content

Conversation

@dkgroot
Copy link
Contributor

@dkgroot dkgroot commented Dec 18, 2017

Related:

Bootstrapped via 'dmd-cxx' branch: See

Notes:

  • Exclude assertion for dragonfly in std/experimental/allocator/mallocator.d (Needs further investigation, not sure why aligned_realloc is causing trouble).

Exclude assertion for dragonfly in std/experimental/allocator/mallocator.d (Needs further investigation, not sure why alliagned_realloc is causing trouble)
cleanup in std/datetime/timezone.d
Notes:
- Exclude assertion for dragonfly in std/experimental/allocator/mallocator.d (Needs further investigation, not sure why alliagned_realloc is causing trouble)
@dlang-bot
Copy link
Contributor

dlang-bot commented Dec 18, 2017

Thanks for your pull request, @dkgroot! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

Bugzilla references

Auto-close Bugzilla Description
18092 Can't combine take and takeExactly

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

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

Thanks a lot for making this happen! A quick, initial review ;-)

posix.mak Outdated
# OS can be linux, win32, win32wine, osx, freebsd, netbsd or dragonflybsd. The system will be
# determined by using uname

#QUIET:=@
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for this to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was needed while debugging, accidentally committed. Retracted now.

posix.mak Outdated
# Configurable stuff, usually from the command line
#
# OS can be linux, win32, win32wine, osx, or freebsd. The system will be
# OS can be linux, win32, win32wine, osx, freebsd, netbsd or dragonflybsd. The system will be
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: break it at 80 chars here (i.e. after dragonflybsd).

std/conv.d Outdated

// Test attribute propagation for UDTs
pure nothrow @safe /* @nogc */ unittest
pure nothrow @safe /+@nogc+/ unittest
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated change - remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made it easier to exclude ranges of unittests, while trying to track down a particular issue.
But reverting the change.

}
else version (DragonFlyBSD)
{
asm pure nothrow @nogc // assembler by W. Bright
Copy link
Contributor

Choose a reason for hiding this comment

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

For the record: I'm not a huge fan of copying blocks as this means a bug fix will very likely miss one of these bits.
Anyhow as far as I know is Walter a huge proponent of using version(A) and not of static if( A || B)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I completely agree. I did see this 'argument' pop up several time in different PR's and Forum discussions. I even wanted to suggest a generic 'BSD' version flag, as they all have common origins, similar to the 'Posix' version. But i did not want to reopen this discussion.

Copy link
Member

Choose a reason for hiding this comment

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

Or maybe we do away with the asm implementation and implement a better poly algorithm.

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

Copy link

Choose a reason for hiding this comment

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

It's possible too to put the implementation in a token string enum polyAsm = q{ asm pure nothrow @nogc { ... } }; and to mix it

Copy link
Contributor Author

@dkgroot dkgroot Dec 19, 2017

Choose a reason for hiding this comment

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

I think this discussion should be had outside this PR. Sounds more like a structural (ie ASM) discussion, than pertaining to this particular PR (correct ?).

}
else version(DragonFlyBSD)
{
auto nameStr = "hw.ncpu\0".ptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Off topic: this looks like a very old style. IIRC are strings literals always zero-terminated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know, maybe someone else can answer this one.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's true, the string literals are always zero-terminated. I was wondering if something is also doing nameStr.length in which case it makes sense putting this \0 but it doesn't look like 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.

@nemanja-boric-sociomantic
So should i rewrite this to: auto nameStr = "hw.ncpu".ptr;, or just leave it as is.

The surrounding lines are doing the same, though. and i do not want to correct them (Only DragonFlyBSD related lines should be touched in this PR).

Copy link
Contributor

@nemanja-boric-sociomantic nemanja-boric-sociomantic Dec 18, 2017

Choose a reason for hiding this comment

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

I would leave them as is IMHO and do this separately (meaning just leave the "hw.ncpu\0".

@dkgroot dkgroot changed the title Dragonflybsd master Add DragonFlyBSD support for phobos Dec 18, 2017
Copy link
Member

@jmdavis jmdavis left a comment

Choose a reason for hiding this comment

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

The std.datetime portions definitely look fine, and I don't see any issues in the other changes either. It'll be nice to see another BSD added to the list of systems that work with D.

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

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

Overall everything looks good to me, except for two changes, that I would prefer if you could figure out why they are needed.

{//@@@BUG@@@ write is @system
with(zis)
{
import std.regex.internal.kickstart;
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure that this import is needed? I wonder why it hasn't shown up as problem on other platforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had some trouble in line 1095 when running without this added import. I will recheck.

Copy link
Contributor Author

@dkgroot dkgroot Dec 20, 2017

Choose a reason for hiding this comment

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

Looks like the issue was resolved (possible/maybe by the git rebase i did before committing the PR). Will remove the import.
Thanks for finding this one.

assert(c.ptr);

version (DragonFlyBSD) {} else /* FIXME: assertion below fails, have not been able to figure out why, yet */
assert(!AlignedMallocator.instance.alignedReallocate(c, size_t.max, 4096));
Copy link
Member

Choose a reason for hiding this comment

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

If this assert fails it follows that alignedReallocate successfully called posix_memalign, allocating more virtual memory than what could be reasonably available on the system. Can you try to debug this test and see what exactly breaks down?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reported this error to dragonfly (dragonfly bug report)
See PR Discussion
Will update this entry to add both these links, so the issue can be tracked.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

@dkgroot
Copy link
Contributor Author

dkgroot commented Dec 20, 2017

@ZombineDev Thanks for Reviewing BTW
@jmdavis Thanks !

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

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

Thanks @dkgroot for the swift reply and changes. Please squash your commits into one and this PR will be good to go.

@dkgroot
Copy link
Contributor Author

dkgroot commented Dec 20, 2017

@ZombineDev Thanks for the review. I guess i will still have to wait a little, to allow other to review, before squashing, right ? How do you guys normally like to see this squash done, using 'rebase -i HEAD~5'?

@ibuclaw
Copy link
Member

ibuclaw commented Dec 20, 2017

@dkgroot. Yes, git rebase and then fix up all commits into one. Amending the original commit message if necessary.

@PetarKirov
Copy link
Member

PetarKirov commented Dec 20, 2017

I think the PR is good to go, so we don't need to wait more. I prefer doing squashing with git rebase -i HEAD~<number of commits on top of master> (in your case git rebase -i HEAD~8) and marking all commits except for the first one as squash or fixup (http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html).

@dkgroot
Copy link
Contributor Author

dkgroot commented Dec 20, 2017

@ZombineDev I did the git rebase -i HEAD~8 as you suggested, but now this PR includes other/unrelated commits (ie: #a11f63ff,#4a1065e1,#1ad40c60,#cae4a305), See. I hope this is not going to cause issues.

@nemanja-boric-sociomantic
Copy link
Contributor

Just do git fetch upstream followed by git rebase -i upstream/master, given that the upstream is the name of the blessed remote.

@PetarKirov
Copy link
Member

PetarKirov commented Dec 20, 2017

@dkgroot Yes, as @nemanja-boric-sociomantic said, first rebase your branch on top of upstream master and then squash it. (Sorry for not mentioning this before.)

@dkgroot dkgroot force-pushed the dragonflybsd-master branch from aa3822f to cae4a30 Compare December 20, 2017 14:40
@nemanja-boric-sociomantic
Copy link
Contributor

I see you lost all of your commits :-). git reflog will save you in case you don't know it already.

@andralex
Copy link
Member

@dkgroot what I do when I have unrelated commits in my PR is I remove them during git rebase -i

@andralex
Copy link
Member

@dkgroot you may want to send me email (see http://erdani.com/index.php/contact) and I'll invite you to https://dlang.slack.com. Then you can get community help in real time via text chat in the browser.

@ibuclaw
Copy link
Member

ibuclaw commented Dec 20, 2017

@andralex - He is already on slack. :-)

@dkgroot
Copy link
Contributor Author

dkgroot commented Dec 20, 2017

Sorry for the 'git mess' I created. Accoding to @Geod24 it is merge able as is, so leaving it alone for now.
Thanks for all your help guys

@andralex
Copy link
Member

Thanks for the work and many thanks to the reviewers! I'll do the honors unless someone beats me to it.

@andralex andralex merged commit fac1693 into dlang:master Dec 20, 2017
@andralex
Copy link
Member

Oh, was too hasty - many commits. Will undo this.

@dkgroot
Copy link
Contributor Author

dkgroot commented Dec 20, 2017

Thanks a lot everyone for the help / review / git stuff and the final merge !

@MartinNowak
Copy link
Member

Thanks for your contribution.

Oh, was too hasty - many commits. Will undo this.

Well a missing squash isn't the end of the world, it's only a single merge commit on master after all.

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