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

rdmd fixes (issues 14296, 16962 and 16978) #207

Merged
merged 11 commits into from
Dec 24, 2016

Conversation

CyberShadow
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
14296 RDMD fails at building a lib when the source is in a subdir
16962 rdmd --build-only --force -c main.d fails: ./main: No such file or directory
16978 [REG2.072.0] pragma(lib) is broken with rdmd

@CyberShadow
Copy link
Member Author

CyberShadow commented Dec 17, 2016

@wilzbach CI scripts should use fixed versions of components from other repositories (that are not being tested). Digger was "broken" (it failed to build due to a warning in ae) which was causing tests to fail. I've now pushed a fix, but Dub can't pick it up:

Root package digger reference ae 0.0.1859 cannot be satisfied.

This is despite the tag existing on GitHub, of course. I think this is an instance of dlang/dub#1000, i.e. Dub being "broken by design" for now as far as deployment goes, so it's not usable for CI or deployment.

@CyberShadow
Copy link
Member Author

Oh, OK. Tests are failing because #202 isn't in stable.

@aG0aep6G
Copy link
Contributor

Revert of #194 is fine with me. As I said in the discussion for issue 16962, I don't really have time to look into this at the moment.

~ [ "-of"~fullExeTemp ]
~ [ "-od"~objDir ]
~ [ "-I"~dirName(root) ]
~ [ root ];
Copy link
Member

Choose a reason for hiding this comment

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

space around operators :)

// regardless of the operating system it's running on.
std.file.write(rspName, array(map!escapeWindowsArgument(todo)).join(" "));

todo = [ "@"~rspName ];
Copy link
Member

Choose a reason for hiding this comment

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

spaces

}

immutable result = run([ compiler ] ~ todo);
Copy link
Member

Choose a reason for hiding this comment

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

like here

auto depsGetter =
// "cd "~shellQuote(rootDir)~" && "
[ compiler ] ~ compilerFlags ~
["-v", "-o-", rootModule, "-I"~rootDir];
Copy link
Member

Choose a reason for hiding this comment

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

spaces

@@ -28,11 +28,13 @@ version (Posix)
{
enum objExt = ".o";
enum binExt = "";
enum libExt = ".a";
Copy link
Member

Choose a reason for hiding this comment

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

nice

~this()
{
import core.thread;
Thread.sleep(100.msecs); // Hack around Windows locking the directory
Copy link
Member

Choose a reason for hiding this comment

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

Put a version around it? Are there better workarounds? We shouldn't have people wait 100 extra milliseconds on all platforms. Note that currently "rdmd hello.d" takes 200ms on a typical Posix system to build.

I'll ask for changes because of this, rest are optional nits.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't write this code (it was a refactoring), but might as well.

Copy link
Member

Choose a reason for hiding this comment

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

thx!!


version (linux)
{
TmpDir srcDir = "rdmdTest";
Copy link
Member

Choose a reason for hiding this comment

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

braces should indent

@CyberShadow
Copy link
Member Author

CyberShadow commented Dec 17, 2016

Please review commit by commit. You are reviewing changes in revert / refactoring commits.

@andralex
Copy link
Member

@CyberShadow well I clicked on "Files changed", wouldn't that comprise everything?

@CyberShadow
Copy link
Member Author

Yes, but that's generally a broken way to review a multi-commit PR (where the successive commits aren't fixups, and they aren't here).

@CyberShadow
Copy link
Member Author

I'll add the requested changes anyhow.

@CyberShadow
Copy link
Member Author

We shouldn't have people wait 100 extra milliseconds on all platforms. Note that currently "rdmd hello.d" takes 200ms on a typical Posix system to build.

Oh, and I should point out that that particular hack was in the test suite, not rdmd itself. But yeah, point stands.

The problem is usually due to Windows Defender, the standard Windows anti-malware, or some other antivirus locking the directory so it could have a look at the files we create. We've had problems with it in Phobos tests as well.

@andralex
Copy link
Member

core.exception.AssertError@rdmd_test.d(139): /tmp/.rdmd-1000/eval.E60124B13F32A50795E744C041B53089.d(6): Error: module cstream is in file 'std/cstream.d' which cannot be read

@CyberShadow
Copy link
Member Author

Yes, the fix for that is on another branch (master) as mentioned above.

@andralex
Copy link
Member

oh lemme take a lookie

@andralex
Copy link
Member

@CyberShadow @MartinNowak so what's the sequence needed to do this right? Pull #202 in stable first?

@andralex
Copy link
Member

@CyberShadow @MartinNowak ping

@CyberShadow
Copy link
Member Author

CyberShadow commented Dec 22, 2016

I think we can cherry-pick #202 here. @MartinNowak ?

Or we can ignore the CI status, since stable was failing without or with this PR.

@wilzbach
Copy link
Member

I think we can cherry-pick #202 here. @MartinNowak ?

I think we should, because it was fixing a real problem
-> #210

@dlang-bot dlang-bot merged commit bfbcd08 into dlang:stable Dec 24, 2016
@MartinNowak
Copy link
Member

Yes, cherry-picking is OK if necessary, but generally all fixes of released issues should always go into stable.

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.

6 participants