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 <target-name>` 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

Reply via email to