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

More removal of version(unittest) #6453

Merged
merged 1 commit into from
Apr 14, 2018

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"

@@ -41,18 +41,6 @@ module std.internal.cstring;
import std.range;
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.

@@ -122,14 +122,10 @@ else

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.

@@ -454,6 +450,7 @@ class Protocol
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
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
Member

Random error, ignore it for the time being.

@schveiguy
Copy link
Member Author

Random error

Ugh. Now doc builder too.

@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
Member

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
Member

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