Skip to content

Conversation

@wpoely86
Copy link
Member

@wpoely86 wpoely86 commented Mar 9, 2015

Seems more logical to me and it shouldn't break anything...

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1479/
Test FAILed.

@wpoely86
Copy link
Member Author

wpoely86 commented Mar 9, 2015

@boegel Jenkins says:

Failed to find EasyBuild vsc-base package

@wpoely86
Copy link
Member Author

retest this please

Copy link
Member

Choose a reason for hiding this comment

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

maybe better use hits = sorted(...), wherever hits is defined?

Copy link
Member Author

Choose a reason for hiding this comment

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

why? Does that make any difference?

Copy link
Member

Choose a reason for hiding this comment

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

it ensures that hits is always sorted, may be used deeper down or higher up (maybe not now, but later, who knows)

also, using .sort() means side-effects (hits is modified in-place, no explicit reassignment to hits), which makes it less easier to understand the code (it may be more efficient, but that'll be in the noise here, most likely)

@wpoely86
Copy link
Member Author

@boegel fixed

Copy link
Member

Choose a reason for hiding this comment

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

isn't hits defined higher up? do the sorted thing there, outside of this if hits block

Copy link
Member Author

Choose a reason for hiding this comment

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

why? it only makes sense to sort if there is something to sort?

Copy link
Member

Choose a reason for hiding this comment

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

again, hits may be used again deeper down or higher up, who knows

sorted([]) is pretty cheap anyway ;)

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1488/
Test PASSed.

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1489/
Test PASSed.

@hpcugentbot
Copy link

Refer to this link for build results (access rights to CI server needed):
https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/1490/
Test PASSed.

@boegel
Copy link
Member

boegel commented Mar 12, 2015

going in, sorry for being so picky @wpoely86 ;)

boegel added a commit that referenced this pull request Mar 12, 2015
Sort the results of a filesearch
@boegel boegel merged commit aba4f95 into easybuilders:develop Mar 12, 2015
@wpoely86 wpoely86 deleted the sort-search branch March 12, 2015 08:46
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.

3 participants