Skip to content

Comments

Fix CircleCi style checker#4850

Merged
CyberShadow merged 13 commits intodlang:masterfrom
wilzbach:fix_circleci_style
Dec 8, 2016
Merged

Fix CircleCi style checker#4850
CyberShadow merged 13 commits intodlang:masterfrom
wilzbach:fix_circleci_style

Conversation

@wilzbach
Copy link
Contributor

It seems like we/I accidentally disabled the style target on CircleCi (style is not defined in the command switch). I take the full blame for this, but at least it's a good proof that the CI actually does catch quite a few things ;-)

I split up the fixes depending on their category.

There's only one line left about which DScanner is complaining (hence the "blocked" label):

public static immutable ctRegex(alias pattern, alias flags=[]) = ctRegexImpl!(pattern, flags).nr;

It warns with:

std/regex/package.d(421:32)[error]: Declaration expected
std/regex/package.d(421:62)[error]: Declaration expected
std/regex/package.d(421:64)[error]: Declaration expected
std/regex/package.d(421:97)[warn]: Empty declaration

@Hackerpilot is there a simple fix? Otherwise I will add this file to the Dscanner blacklist.

@Hackerpilot
Copy link
Contributor

I'll have to figure out what kind of declaration that is and then update the parser.

@Hackerpilot
Copy link
Contributor

This should help: https://github.com/Hackerpilot/Dscanner/releases/tag/v0.4.0-beta.1

@Hackerpilot
Copy link
Contributor

Hackerpilot commented Oct 14, 2016

Interesting. The compiler used by Travis can't find the mallocator module. Why is it using dmd-2.068.2?

@MartinNowak
Copy link
Member

Why is it using dmd-2.068.2?

Because you're not specifying with which dmd to build dscanner. It just picks up whatever system-wide dmd installed. Please fix that, e.g. similarly to how we pin stable dmd versions for building dlang.org's ddocs or dmd's bootstrap compiler.

@wilzbach
Copy link
Contributor Author

... and now we run into problem that currently our installer is broken for point releases :/
(See dlang/installer#201 for more details)

@wilzbach wilzbach force-pushed the fix_circleci_style branch 2 times, most recently from 96f7ee3 to 2f54a27 Compare November 22, 2016 20:58
@wilzbach
Copy link
Contributor Author

Okay I once again updated this PR to include the changes that managed to sneak in over the last month.
I also had to disable Dscanner's new check for auto return functions which return void as it's commonly used like version(Stddoc) auto myfunction(){ assert(0)} or with mixin.

I hope that this version now passes our CI, s.t. we can finally enable the check again :)

std/random.d Outdated
{
import std.algorithm : canFind, map;
import std.algorithm.searching : canFind;
import std.algorith.iteration : map;
Copy link
Contributor

Choose a reason for hiding this comment

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

Failing on this line. algorithm is misspelled

@wilzbach
Copy link
Contributor Author

wilzbach commented Dec 8, 2016

I went through another round of catching up & thus rebased to the lastest changes. It would be quite nice if we can get this in rather sooner than later :)

}

auto opBinary(string op)(sizediff_t shift)
typeof(this) opBinary(string op)(sizediff_t shift)
Copy link
Member

Choose a reason for hiding this comment

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

This is technically a false positive, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes unfortunately Dscanner can't expand mixins atm, s.t. is the poor man's workaround "for the greater good".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh it seems that Dscanner got even smarter: dlang-community/D-Scanner#379, so I reverted that workaround.

@CyberShadow
Copy link
Member

Auto-merge toggled on

@CyberShadow
Copy link
Member

How come I don't see CircleCI in the CI services list on this PR?

@CyberShadow
Copy link
Member

Auto-merge toggled off

@JackStouffer
Copy link
Contributor

JackStouffer commented Dec 8, 2016

Its actually disappeared from all PRs, so probably not due to these changes.

@CyberShadow
Copy link
Member

Perhaps it's because of this setting?

Link goes to https://circleci.com/docs/fork-pr-builds/.

I don't know how CircleCI is configured (heck, I have no clue why we even need it at all considering there's Travis and AppVeyor), so I'm not sure if it's safe to enable or if it's relevant at all. @wilzbach ?

@wilzbach
Copy link
Contributor Author

wilzbach commented Dec 8, 2016

How come I don't see CircleCI in the CI services list on this PR?

Oh sorry - I was hoping that it was just a temporary outage and would start to build the PR.
-> I will have a look :(

I don't know how CircleCI is configured (heck, I have no clue why we even need it at all considering there's Travis and AppVeyor), so I'm not sure if it's safe to enable or if it's relevant at all. @wilzbach ?

The only reason for using CircleCi is because it's not Travis :P
With the free plan an organization (e.g. dlang) gets five concurrent slots and well with all it's parallel builds dmd uses all of them.

@CyberShadow
Copy link
Member

The only reason for using CircleCi is because it's not Travis :P

So, to clarify... CircleCI has more throughput than Travis, or using both gets us more throughput than using just one, or something else?

@wilzbach
Copy link
Contributor Author

wilzbach commented Dec 8, 2016

So, to clarify... CircleCI has more throughput than Travis, or using both gets us more throughput than using just one, or something else?

Yes it's solely about having more throughput. We tried to use Travis for Phobos before and the builds were stuck in the queue for days, hence the move to CircleCi.
The use of CircleCi for code coverage testing at dmd and druntime has a similar motivation.

I don't know the reason for the outage with CircleCi yet, but unfortunately it doesn't have anything to do with the "Permissive build setting").
Anyways thanks to @MartinNowak the CI logic is in this separate circleci.sh, so we are pretty agnostic about the CI provider.

@wilzbach
Copy link
Contributor Author

wilzbach commented Dec 8, 2016

Perhaps it's because of this setting?

Seems like you were right. As we don't have any sensitive information stored with CircleCi, I flipped "Permissive building of fork pull requests" to "on" and it seems to be building now :)

While I was looking at our config I also realized that a bug in Dscanner has been fixed and we can now re-enable the style checking for std/conv.d. Sorry for the noise :/

@CyberShadow
Copy link
Member

Auto-merge toggled on

@CyberShadow CyberShadow merged commit 8b2a338 into dlang:master Dec 8, 2016
@wilzbach wilzbach deleted the fix_circleci_style branch December 8, 2016 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants