Closed mrquincle closed 2 years ago
It looks like every single file in the working directory is opened.
def _cacheFileContents(self):
"""
Cache contents of all cached fileNames.
"""
for fileName in self.fileNames:
filePath = fileName
try:
file = open(filePath, "r", encoding="utf-8")
lines = file.readlines()
file.close()
except:
_LOGGER.warning(f"Error in file {filePath}")
self.bluenetFiles[fileName] = lines
Only source files should be inspected.
It currently fails on a tags
file which is generated by ctags
. However, that's quite irrelevant. There can be other files here as well that are not source files.
Options to fix:
Walk it manually and pick up .c
, .cpp
and .h
files and a few other extensions that might be useful.
Make use of the cache files that are populated by cmake
.
cat CMakeFiles/crownstone.dir/CXX.includecache | sort | uniq | grep -v '#'
This lists:
access_config.h
access.h
access_internal.h
access_publish.h
access_reliable.h
access_status.h
...
...
...
util/cs_Utils.h
util/cs_UuidParser.h
util/cs_Variance.h
util/cs_WireFormat.h
utility
utils.h
vector
Here you can use a regexp if you'd like to excluded Nordic files or other files.
Alternatively, you can use the CMake variable we have defined to collect all source files:
cat list_variables.txt | grep FOLDER_SOURCE
This does not include header files, so it's less useful.
Pros and cons.
build/default/include/cfg/cs_StaticConfig.h
)..hpp
files).Seems to me the first argument outweighs almost everything else.
@vliedel This is still not fixed. If there is any binary (or even non-binary) file in the directories, the binary logger can choke on it.
Describe the bug
On running
make uart_binary_client
the build system defaults to errors.To Reproduce
Checkout and run
make uart_binary_client
.Expected behavior
Working binary UART client.
Already done
At least on an error like this the user should be hinted in setting the
-DDOWNLOAD_BLUENET_LIB_LOGS=ON
option for cmake.Not that that fixed it. :-)