Why Conan shows me "ERROR: Specify the 'user' and the 'channel' or neither of them" when I try to run "conan export-pkg . hello/0.1#myuser/testing"? - conan

I'm trying to use
conan export-pkg . hello/0.1#myuser/testing
command following the tutorial from https://docs.conan.io/en/latest/creating_packages/existing_binaries.html. But conan keeps showing this error message:
ERROR: Specify the 'user' and the 'channel' or neither of them.
It doesn't make any difference if I remove both user and channel.
I tried:
conan export-pkg . hello/0.1
conan export-pkg . hello
conan export-pkg .
And I got the same error every time. What is this error message about and how can be resolved? What am I doing wrong?
My conan version is: 1.29.0

I've been able to work around this problem after submitting an issue to the Conan developers.
I had changed the storage.path setting in my conan.conf to a top-level folder of drive D:\:
# File: <username>/.conan/conan.conf
# ...
[storage]
# (default) Relative path to a folder in C:\
#path = ./data
# Absolute path to a top-level folder in D:\
path = D:\conan_packages
After a while, it just stopped working.
I worked around this by setting storage.path to a non top-level folder of D:\, e.g.
[storage]
path = D:\conan\packages

Related

XCode: The file “[APP NAME].app” couldn’t be opened because there is no such file

For context, I am encountering this immediately after resolving this issue:
Xcode error: unable to create directory '/[PATH_TO_APP]/[APP_NAME].app' (in target '[TARGET]' from project '[PROJECT]')
Here is the full error details text (with redactions in [] for privacy):
Details
The file “[APP NAME].app” couldn’t be opened because there is no such file.
Domain: NSCocoaErrorDomain
Code: 260
Failure Reason: The file doesn’t exist.
User Info: {
NSFilePath = "/[APP NAME].app";
}
--
The operation couldn’t be completed. No such file or directory
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
--
System Information
macOS Version 10.15.5 (Build 19F101)
Xcode 11.5 (16139)
Running ls -l in the project folder shows the [APP NAME].app now present, but navigating to the same location and selecting the file in Finder shows a "crossed out circle" over the app's icon. Removing the file and building again results in the same thing. I've also tried renaming the project and restarting, etc, to no avail.
NSFilePath = "/[APP NAME].app" feels like a missing or misspelled environment variable.
If the build expects custom environment variable like $(MyBuildDir) to be defined, when it's not, then running a command with $(MyBuildDir)/[APP NAME].app would result in "/[APP NAME].app"
The same is true for if the environment variable misspelled. For example, using $(UBILD_DIR)/[APP NAME].app instead of BUILD_DIR would result in "/[APP NAME].app"

Why is clang-tidy not getting its options set through ALE?

I'm able to run clang-tidy with my source file clang-tidy -p build/compile_commands.json filename.h and it works as expected. When I open the file through vim I get errors with the first #includes, which happens if I leave the -p option off the invocation.
In my vimrc I tried setting g:ale_c_build_dir to build and that didn't work, so I tried setting g:ale_cpp_clangtidy_extra_options with the -p argument above and that didn't work. I'm able to confirm that these values are being set properly with ALEInfo, they're just not being used in the clang-tidy invocation apparently.
I am currently trying to set ALE up with clang-tidy myself, and eventually got it working with the following config:
let g:ale_linters = {
\ 'cpp': ['clangtidy'],
\ 'c': ['clangtidy'],
\}
let g:ale_fixers={
\ 'cpp': ['clang-format'],
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\}
let g:ale_cpp_clangtidy_checks = []
let g:ale_cpp_clangtidy_executable = 'clang-tidy'
let g:ale_c_parse_compile_commands=1
let g:ale_cpp_clangtidy_extra_options = ''
let g:ale_cpp_clangtidy_options = ''
let g:ale_set_balloons=1
let g:ale_linters_explicit=1
let g:airline#extensions#ale#enabled=1
As you can see, i have skipped setting g:ale_c_build_dir_names or g:ale_c_build_dir, since the defaults should do the job just fine (see excerpts from documentation below), given that your compile_commands.json resides in build or bin directory of the root of your project. One thing i have noticed is that linting with clang-tidy when used as ALE's linter is very slow.
g:ale_c_build_dir_names
Type: List
Default: ['build', 'bin']
A list of directory names to be used when searching upwards from cpp
files to discover compilation databases with. For directory named 'foo',
ALE will search for 'foo/compile_commands.json' in all directories on and above
the directory containing the cpp file to find path to compilation database.
This feature is useful for the clang tools wrapped around LibTooling (namely
here, clang-tidy)
And:
g:ale_c_build_dir
Type: String
Default: ''
For programs that can read compile_commands.json files, this option can be
set to the directory containing the file for the project. ALE will try to
determine the location of compile_commands.json automatically, but if your
file exists in some other directory, you can set this option so ALE will
know where it is.
This directory will be searched instead of g:ale_c_build_dir_names.

Geb/Spock Error- No reports dir has been configured, you need to set in the config file or via the build adapter

I have trouble running my functional test from IntelliJ IDE. When I run the functional test, I got the following error message:
java.lang.IllegalStateException: No reports dir has been configured, you need to set in the config file or via the build adapter.
at geb.Browser.getReportGroupDir(Browser.groovy:899)
at geb.Browser.cleanReportGroupDir(Browser.groovy:932)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at geb.spock.GebReportingSpec.setupSpec(GebReportingSpec.groovy:37)
Based on my research, all I need to do is to add the following code in GebConfig.groovy:
reportsDir = new File("target/runtime_reports_dir")
I added the line to GebConfig.groovy and rebuild the project, but still running into the same issue. Is there any other fix to this error?
Adding reportsDir = 'target/geb-reports' to your GebConfig shoud fix this, can you show me your GebConfig file?
There is also another fix for it, your test class extends GebReportingSpec, you can chage it to GebSpec and it should also work.
I had this same issue, while having the reportsDir correctly configured in the GebConfig
Adding the resources folder (where my GebConfig is located) as "Test Sources Root" did the trick for me
To mark the folder as "Test Sources Root":
Right click in the folder
Mark Directory as
Test Sources Root
Happy testing!

Yocto SDK, QtWebEngine: Unknown module(s) in QT: webengine

I'm doing my first steps with Qt and QtWebEngine on an embedded board (i.MX6), using Yocto. Using provided example recipes, like the quicknanobrowser, works nicely on the target. So I can't confirm this answer which claims that WebEngine is not available on embedded platforms.
Now I want to write my own QML application and deploy it on the board. With the recipe meta-toolchain-qt5 I created an SDK and installed it. In QtCreator I set all paths to the SDK installation and tried to build it, but got this error:
Project ERROR: Unknown module(s) in QT: webengine
11:13:13: The process "/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" exited with code 3.
It turned out that WebEngine was not included in the SDK. Thanks to this answer, I fixed that by putting the following to my own packagegroup-qt5-toolchain-target.bbappend file:
RDEPENDS_${PN} += " \
qtwebengine \
qtwebengine-qmlplugins \
qtquickcontrols-qmlplugins \
qtwebengine-examples \
"
Then reinstalled the SDK. Now it seems that all WebEngine files are available in the SDK installation (the zsh glob pattern below matches all directories in any subdirectory of /opt/poky/1.8/, which contain "webengine", case-insensitively):
% ls -1 -d (#i)/opt/poky/1.8/**/*webengine*(/)
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngine/5.4.3/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/qt5/QtWebEngineWidgets/5.4.3/QtWebEngineWidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/qt5/qml/QtWebEngine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webengine/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/examples/webenginewidgets/
/opt/poky/1.8/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/share/qt5/translations/qtwebengine_locales/
Still, I get the same Unknown module error. This is independent of QtCreator, and can also be shown by directly calling qmake:
% source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
% /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake /home/me/test/test.pro -r -spec linux-oe-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
Project ERROR: Unknown module(s) in QT: webengine
The project itself should be fine, because it compiles and runs without problems on the Desktop installation.
Any ideas? Are there maybe still some files missing in the SDK? Where does qmake search for the modules? How can I tell qmake where to find the WebEngine installation?
In /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
add sh /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/environment-setup.d/qt5.sh
This will set up the Qt5 environment.

Capistrano deploy fails due to missing manifest file when using assets prefix

I've just set up a Capistrano deploy for our application and I keep running into this error:
* executing ["ls /path/to/app/shared/assets/manifest*"]
servers: ["web03"]
[web03] executing command
[err :: web03] ls: /path/to/app/shared/assets/manifest*
[err :: web03] : No such file or directory
If I manually create a manifest file with touch /path/to/app/shared/assets/manifest.yml, the deploy script works fine. However, this feels all sorts of sketchy.
I've googled the heck out of this and the most I can gather is that the manifest file it's looking for is a product of the asset pipeline. I checked and I do, in fact, have the pipeline enabled (config.assets.enabled = true), so I'm at a loss.
Could someone please help me understand 1) what this manifest file is and how it's created; and 2) why isn't one being created for my application?
Update: I think I'm closing in on the answer and I think it has something to do with this line:
config.assets.prefix = "/some_other_path"
We needed to rename the "asset" path because we have Asset objects in our system and I'm guessing Cap might be getting confused because of it. Any suggestions?
My suspicion was right: this was a problem with the renamed asset directory. Cap didn't know to look in public/some_other_path instead of public/assets.
In other words, because this line is in my application.rb:
config.assets.prefix = "some_other_path"
I had to add this line to my deploy.rb:
set :assets_prefix, "some_other_path"
Then, Cap knows where to look for a manifest, copies it into shared/assets, and finishes correctly.
It'd be handy to have the deploy.rb reference the config variable instead of having to hard-code the path a second time, but that's outside the scope of this question.
if you configure with the aws, here it should be...
appname/config/environments/production.rb
config.action_controller.asset_host = "//#{ENV['FOG_DIRECTORY']}.s3.amazonaws.com"
config.assets.prefix = "/#{ENV['APP_NAME']}/assets"
appname/config/deploy.rb
...
set :keep_releases, 5
set :assets_prefix, ->{ "#{fetch(:application)}/assets" }
set :whenever_identifier, -> { "#{fetch(:application)}_#{fetch(:stage)}" }
...