Re: issue with missing log api

2019-02-05 Thread markus
Hi Chris,

that does the trick! Although I now run into a different
issue:

Compiling apps/s/src/events.cc
Compiling apps/s/src/console.cc
Error: In file included from
repos/apache-mynewt-core/kernel/os/include/os/os.h:132:0, from
apps/s/src/events.h:7, from apps/s/src/events.cc:1:
repos/apache-mynewt-core/kernel/os/include/os/os_mutex.h: In function
'os_error_t os_mutex_get_level(os_mutex*)':
repos/apache-mynewt-core/kernel/os/include/os/os_mutex.h:122:16: error:
invalid conversion from 'uint16_t {aka short unsigned int}' to
'os_error_t {aka os_error}' [-fpermissive] return mu->mu_level;
^~~~

I guess not a lot of folks check for C++ compatibility. But that's a bug I can 
fix myself ;)

Thanks a lot,
Markus



On Tue, 5 Feb 2019 07:32:04 -0800
Christopher Collins  wrote:

> Hi Markus,
> 
> On Mon, Feb 04, 2019 at 08:34:50PM -0800, markus wrote:
> > I updated to the latest master from github (4fedf428) and now my
> > projects break with the error message:
> > 
> > Building target targets/s
> > Error: Unsatisfied APIs detected:
> > * log, required by: sys/log/modlog  
> 
> To solve this issue without enabling logging, you can add
> `@apache-mynewt-core/sys/log/stub` to your app's list of dependencies
> (`pkg.deps`).  This satisfies the `log` API requirement without
> pulling in any actual logging functionality.
> 
> This is not a great fix--it does the job, but it is a hassle for the
> developer.  A solution that does not require you to modify a `pkg.yml`
> file would be much better.  I have a few ideas, but haven't
> implemented anything yet.  We should definitely do something about
> this problem before the next release so others don't struggle with
> this one.  Thanks for raising this issue.
> 
> You are seeing this issue because logging has been integrated
> into several more core packages.  I think most projects already use a
> log package and are unaffected, but that is just an assumption.
> 
> By the way, the `newt target revdep ` command is a useful
> tool for debugging issues like this.  In this case, it will tell you
> which package(s) depends on modlog.
> 
> > Since I neither need nor want any logging in my app I figured I'll
> > turn it off by setting
> > 
> > NEWT_FEATURE_LOGCFG: 0
> > 
> > in syscfg.yml - unfortunately this results in a segfault in the newt
> > tool. Updating that to the latest master (bc272f6e) has the same
> > result.  
> 
> The `NEWT_FEATURE_[...]` settings should not be overridden.  I
> probably would have tried the same thing :).
> 
> Chris



Re: issue with missing log api

2019-02-05 Thread Christopher Collins
Hi Markus,

On Mon, Feb 04, 2019 at 08:34:50PM -0800, markus wrote:
> I updated to the latest master from github (4fedf428) and now my
> projects break with the error message:
> 
> Building target targets/s
> Error: Unsatisfied APIs detected:
> * log, required by: sys/log/modlog

To solve this issue without enabling logging, you can add
`@apache-mynewt-core/sys/log/stub` to your app's list of dependencies
(`pkg.deps`).  This satisfies the `log` API requirement without pulling
in any actual logging functionality.

This is not a great fix--it does the job, but it is a hassle for the
developer.  A solution that does not require you to modify a `pkg.yml`
file would be much better.  I have a few ideas, but haven't implemented
anything yet.  We should definitely do something about this problem
before the next release so others don't struggle with this one.  Thanks
for raising this issue.

You are seeing this issue because logging has been integrated
into several more core packages.  I think most projects already use a
log package and are unaffected, but that is just an assumption.

By the way, the `newt target revdep ` command is a useful
tool for debugging issues like this.  In this case, it will tell you
which package(s) depends on modlog.

> Since I neither need nor want any logging in my app I figured I'll
> turn it off by setting
> 
> NEWT_FEATURE_LOGCFG: 0
> 
> in syscfg.yml - unfortunately this results in a segfault in the newt
> tool. Updating that to the latest master (bc272f6e) has the same
> result.

The `NEWT_FEATURE_[...]` settings should not be overridden.  I
probably would have tried the same thing :).

Chris


issue with missing log api

2019-02-04 Thread markus
I updated to the latest master from github (4fedf428) and now my
projects break with the error message:

Building target targets/s
Error: Unsatisfied APIs detected:
* log, required by: sys/log/modlog

Since I neither need nor want any logging in my app I figured I'll
turn it off by setting

NEWT_FEATURE_LOGCFG: 0

in syscfg.yml - unfortunately this results in a segfault in the newt
tool. Updating that to the latest master (bc272f6e) has the same
result.

Any idea what's going on here?

Thanks in advance,
Markus