Skip to content

Conversation

@schveiguy
Copy link
Member

See #6450

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @schveiguy!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + phobos#6453"

import std.traits;

version(unittest)
@property inout(C)[] asArray(C)(inout C* cstr) pure nothrow @nogc @trusted
Copy link
Member Author

Choose a reason for hiding this comment

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

Putting a trusted function like this in the global namespace is not a good idea.

version(unittest)
{
static assert(is(uint32_t == uint));
static assert(is(uint16_t == ushort));
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, uint32_t and uint16_t are nowhere else in this file. I have no idea what these were for so I removed them. If they are critical to have, they should go somewhere else.

@schveiguy schveiguy force-pushed the version_unittest_p4 branch from 1737df8 to bf529ae Compare April 13, 2018 13:55
version(CRuntime_Bionic) {} else
@safe unittest
{
// import std.stdio : writefln;
Copy link
Member Author

@schveiguy schveiguy Apr 13, 2018

Choose a reason for hiding this comment

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

writefln is used in commented out lines below. I put in this comment because before it was imported by the version(unittest) block.

@schveiguy schveiguy force-pushed the version_unittest_p4 branch from bf529ae to 7a2d776 Compare April 13, 2018 15:24
@schveiguy
Copy link
Member Author

ping @wilzbach what is this circleci error in typecons? I can't figure out if it's something I did or not, but I didn't touch typecons.

@JackStouffer
Copy link
Contributor

Random error, ignore it for the time being.

@schveiguy
Copy link
Member Author

Random error

Ugh. Now doc builder too.

@schveiguy schveiguy force-pushed the version_unittest_p4 branch from 7a2d776 to d4a35f0 Compare April 13, 2018 16:20
@schveiguy
Copy link
Member Author

Doc failure seems repeatable, but I don't know what it means. @wilzbach or @CyberShadow ?

@CyberShadow
Copy link
Member

Er, I'm not sure @wilzbach worked on the spec testing stuff, maybe he knows?

Might be exposing a latent compiler bug through some edge case.

@wilzbach
Copy link
Contributor

Looks really weird:

---
void main() {
import std.stdio;
        struct S { int x; float y; }

        int foo(S s) { return s.x; }

        foo( S(1, 2) ); // set field x to 1, field y to 2
        
}
---
/usr/bin/ld: error in __stdin.o(.eh_frame); no .eh_frame_hdr table will be created.
/usr/bin/ld: __stdin.o: invalid string offset 1096055152 >= 528 for section `.strtab'
/usr/bin/ld: unknown operator '(' in complex symbol
/usr/bin/ld: final link failed: Invalid operation
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

I can try more testing tomorrow, but for now I have no idea why this is failing.

@schveiguy
Copy link
Member Author

@wilzbach thanks for looking into it.

@wilzbach
Copy link
Contributor

Regarding the DAutoTest failure -> dlang/dlang.org#2345

@wilzbach wilzbach merged commit de150a4 into dlang:master Apr 14, 2018
@schveiguy schveiguy deleted the version_unittest_p4 branch April 14, 2018 23:39
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.

5 participants