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

Add some type checking of configs #4000

Merged
merged 1 commit into from Mar 29, 2017

Conversation

Projects
None yet
6 participants
@theotherjimmy
Contributor

theotherjimmy commented Mar 22, 2017

Before, the types were not checked and just expected. The old behavior
would cause lots of tracebacks, or, much worse, convert things like:

{
     "target_overrides": {
        "*": {
		"target.macros_add": "CONFIG_GPIO_AS_PINRESET"
        }
     }
}

into a definition of each of the letters as macros that expand to
nothing, causing massive compilation problems.

I resolved this by adding some type checking to the config data. Now
there is a type check for most of the fields within a library and
application configurations.

resolves #3985

Testing

  • /morph test
Add some type checking of configs
Before, the types were not checked and just expected. The old behavior
would cause lots of tracebacks, or, much worse, convert things like:
```
{
     "target_overrides": {
        "*": {
		"target.macros_add": "CONFIG_GPIO_AS_PINRESET"
        }
     }
}
```
into a definition of each of the letters as macros that expand to
nothing, causing massive compilation problems.

I resolved this by adding some type checking to the config data. Now
there is a type check for most of the fields within a library and
application configurations.
@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Mar 22, 2017

@jaustin Be advised. More weird type-related fixes welcome.
@bridadan is that a valid test?

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Mar 22, 2017

I got PR 4000 🎉 🎈 🍰

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 23, 2017

Add some type checking of configs #4000

🍾

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Mar 23, 2017

@bridadan is that a valid test?

tools/tests/config or config_test

@bridadan

This comment has been minimized.

Contributor

bridadan commented Mar 23, 2017

@theotherjimmy Please just use the regular morph test, it includes the example build step already.

@bridadan

This looks great!

@adbridge

This comment has been minimized.

Contributor

adbridge commented Mar 23, 2017

/morph test

@adbridge adbridge added the needs: CI label Mar 23, 2017

@mbed-bot

This comment has been minimized.

mbed-bot commented Mar 23, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1728

All builds and test passed!

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Mar 28, 2017

@sg- sg- merged commit 405ab0c into ARMmbed:master Mar 29, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@theotherjimmy theotherjimmy deleted the theotherjimmy:config-typechecking branch Mar 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment