Comments (6)
The issue remaining is therefore that graph info does not accept the channel on the command line without the user (even if no channel is defined in the recipe) and outputs the following error:
That is correct. Using channel
but not user
is not allowed, there were some complexities to maintain compatibility in the server sides, it would be breaking, so it is not allowed.
So let's say there is a recipe with a user defined as "my_user" and no channel, the graph info command requires to specify the user again (exactly) through the command line if specifying a channel, which is not the case for the build and create commands:
Then, this we want indeed to check it, I'll try to reproduce in a test.
from conan.
Found the issue, was a too early argument check, I have moved it later to allow this: #15794, it will be in next 2.2
from conan.
Thanks for your report
I am not sure this works with create
, the following test fails:
def test_user_channel_override():
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
class SayConan(ConanFile):
name = "pkg"
version = "0.1"
user = "user"
channel = "channel"
""")
c.save({"conanfile.py": conanfile})
c.run("create . --channel=testing")
# ERROR:
# ERROR: Package recipe with channel testing!=channel
Can you please check it?
from conan.
Hi @memsharded,
You are right, I did the test on a recipe that did not have the channel defined (while I thought it had one). So build
and create
are consistent and prevent overriding the channel through the CLI.
The issue remaining is therefore that graph info
does not accept the channel on the command line without the user (even if no channel is defined in the recipe) and outputs the following error:
ERROR: Can't specify --channel without --user
from conan.
So let's say there is a recipe with a user defined as "my_user" and no channel, the graph info
command requires to specify the user again (exactly) through the command line if specifying a channel, which is not the case for the build
and create
commands:
conan graph info . --channel=my_channel --user=my_user
from conan.
Not sure about that either 😅
def test_graph_info_user():
"""
https://github.com/conan-io/conan/issues/15791
"""
c = TestClient()
conanfile = textwrap.dedent("""
from conan import ConanFile
class Pkg(ConanFile):
name = "pkg"
version = "0.1"
user = "user"
""")
c.save({"conanfile.py": conanfile})
c.run("graph info .")
assert "pkg/0.1@user" in c.out
UPDATE: Sorry, now I got it. adding
c.run("graph info . --channel=channel")
assert "pkg/0.1@user/channel" in c.out
Makes it fail
from conan.
Related Issues (20)
- [bug] sqlite3.OperationalError: no such column HOT 5
- [bug] build order produces not buildable build arguments in specific override scenario HOT 11
- [question] Can VirtualRunEnv/VirtualBuildEnv scripts generation be suppressed for deployers? HOT 5
- [bug] subsystem.Popen() should be called with a clean env HOT 11
- [bug] Cannot force generated Find*.cmake modules to fail from the packaged CMake modules
- [bug] `[platform_requires]` does not work with `ConanFile.dependencies` HOT 2
- [question] Strange handling of options in Conan 1.x create lock HOT 2
- How to reference packages such as iostream , limits etc HOT 5
- [bug] dependency collision text report does not match graph HOT 1
- [question] How to use MinGW as build profile on Windows? HOT 2
- [question] Is merging lockfiles pre 2.0 possible? HOT 3
- [question] How to build node from source (autotools, make) HOT 5
- [question] Best approach to "automate" conan commands HOT 5
- [bug] Transitive package's header is NOT visible HOT 3
- [bug] silent recipe change breaks our pipelines HOT 4
- [bug] Requiers field does not allow revisions HOT 5
- [question] URI/URL scheme for a file within a conan package HOT 1
- [question] how to solve "'tools.env.virtualenv:auto_use' does not exist in configuration list or the conf format introduced is not valid." HOT 1
- [question] compressing packages before exporting is taking forever with the CPU doing nothing HOT 1
- [question] Conan tries to download the latest revision from conan remote repository when using local repository HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.