ARMmbed / yotta

DEPRECATED: yotta build; better software
Apache License 2.0
164 stars 64 forks source link

Allow sources at top level #805

Closed bogdanm closed 7 years ago

bogdanm commented 7 years ago

This commit adds the ability to use modules that have sources defined in their top level directory, both directly and in various subdirectories:

module.json
README.md
src1.c
subdir1/
  src2.c
  src3.c
  subdir2/
    src4.c
source/
  main.c

This works both for libraries and applications by specifying "lib": "." or "bin": "." respectively in their module.json.

The current implementation ignores toplevel test directories (like test) so that yotta test can still be used with these modules.

bogdanm commented 7 years ago

@thegecko @marcuschangarm

bogdanm commented 7 years ago

I don't know what to make of the circleci error, I don't understand what's causing it.

marcuschangarm commented 7 years ago

I think the gecko mentioned that the circle job doesn't work...

thegecko commented 7 years ago

@bogdanm I plan to fix Circle sometime soon, for now Travis is good enough to know we are all good :)

thegecko commented 7 years ago

kudos for the tests

autopulated commented 7 years ago

The circle job runs tests which Travis can't, it's configured with credentials for a dummy github account etc.. It also runs a linter. It looks like the failure is because the linter is failing:

py34 runtests: commands[2] | pylint ./yotta
************* Module yotta.link_target
C: 16, 0: Trailing whitespace (trailing-whitespace)
bogdanm commented 7 years ago

It also runs a linter. It looks like the failure is because the linter is failing:

Yes, but I can't make sense of the output:

Global evaluation
-----------------
Your code has been rated at 10.00/10

ERROR: InvocationError: '/home/ubuntu/yotta/.tox/py27/bin/pylint ./yotta'

So pylint obviously ran, it gave a score of 10/10, yet I'm still getting an InvocationError. I don't understand why. Maybe pylint can give 10/10 but still fail?

autopulated commented 7 years ago

see the error quoted above – think the 10/10 score is rounded up from 9.999/10, but if there are any errors the exit status is non-zero.

The actual error is trailing space at the end of line 16 in yotta/link_target.py

thegecko commented 7 years ago

I have fixed the circle build, thanks to @autopulated !

@bogdanm This PR looks good, should we add a version bump, too?

bogdanm commented 7 years ago

I think a new minor is advisable, yes. Thanks @autopulated for all the help.

thegecko commented 7 years ago

Great, can you rebase and bump the version? Should get all tests passing ;)

bogdanm commented 7 years ago

:confetti_ball: