Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`--build <pattern>` seems not to work #4696

Closed
monsdar opened this issue Mar 7, 2019 · 9 comments

Comments

Projects
None yet
5 participants
@monsdar
Copy link
Contributor

commented Mar 7, 2019

When calling conan help install it states the following regarding the --build parameter:

--build=[pattern] Build always these packages from source, but never build the others. [...] 'pattern' is a fnmatch file pattern of a package name.

I would like to install a package and rebuild all of my own packages with it. All of my packages are within the @monsdar/release channel. The following seems not to work though: conan install ... --build *monsdar*. Conan gives me the message ERROR: No package matching '*monsdar*' pattern.

Do I do something wrong? Or is this feature not working correctly?

This happens with Conan 1.13.0 installed via Pip. Python 3.6.1 on a Windows 10 Professional with 64bit.

@monsdar monsdar changed the title Allow placeholders like `conan install ... --build=*@conan/stable` `--build <pattern>` seems not to work Mar 7, 2019

@monsdar

This comment has been minimized.

Copy link
Contributor Author

commented Mar 7, 2019

Note: Just saw what I was originally looking is already there but not working... So I rewrote this issue.

@Johnnyxy

This comment has been minimized.

Copy link

commented Mar 8, 2019

I think you forgot the equals sign.

The parameter should look like this:

conan install ... --build="*monsdar*"

Quotes are optional.

@monsdar

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

Does this work for you then? In my case the following does not work:

  • conan install ... --build *monsdar*
  • conan install ... --build=*monsdar*
  • conan install ... --build "*monsdar*"
  • conan install ... --build="*monsdar*"
  • conan install ... --build '*monsdar*'
  • conan install ... --build='*monsdar*'
@Johnnyxy

This comment has been minimized.

Copy link

commented Mar 8, 2019

Sorry, my mistake I have been testing it with package names instead of package references.
The build=pattern only works with package names e.g. boost, boost*, ... not boost/1.69.0@test/testing or *@test/*.

As the documentation states for the conan install command:

'pattern' is a fnmatch file pattern of a package name.

@uilianries

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

And what happen when a package has the name monsdar but also there are packages using monsdar as namespace? For example:

monsdar/1.0.0@company/stable
foobar/0.1.0@monsdar/stable

The Build Mode can accept full reference, partial package name or regular modes (build, outdated,..). You could add the full reference multiple times, I know this is annoying when you have dozen of packages, but the namespace is not part of package id.

@memsharded Should we support namespace as build mode, like --build "*@user/channel" ?

@Johnnyxy

This comment has been minimized.

Copy link

commented Mar 8, 2019

Then I will correct my answer regarding the full reference.

Specifying full references works according to the source code. :)

@uilianries

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

If it's not working, it's a possible counter feature, not a bug 😂 🐛

@monsdar

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

@uilianries: In case my pattern matches multiple types of packages I'd need to define my pattern better. An working example for that could be the following:

  • conan install ... --build */*@monsdar/release
  • conan install ... --build */*@monsdar/*
  • conan install ... --build *@monsdar*

I can see that this could a a valid usecase. Having a way to define the build-packages like that would make life much easier.

@uilianries

This comment has been minimized.

Copy link
Member

commented Mar 8, 2019

Well I see no limitation on implement this and I think you are not the first one who requests such feature. @memsharded @lasote WDYT ?

@lasote lasote added the stage: queue label Mar 12, 2019

@lasote lasote added this to the 1.14 milestone Mar 20, 2019

@lasote lasote closed this in #4787 Mar 25, 2019

@ghost ghost removed the stage: queue label Mar 25, 2019

lasote added a commit that referenced this issue Mar 25, 2019

#4696: Build-Mode pattern now covers the whole reference (#4787)
* Added: Build-Mode pattern now covers the whole reference, not just the package name. Fixes #4696

* Fixed: PEP8 style coding

* Added: Test to show that incomplete component-names still match

* Fixed: Issue where *Tools hasn't been recognized like before

* Fixed: Only full component names should match, getting rid of the "startwith" case

* Fixed: Do not check for the ref-matching twice

lasote added a commit that referenced this issue Mar 26, 2019

#4696 Part 4 - Now really the right way to check for casing... (#4842)
* Added: Unittest for casing

* Added: Case-sensitive checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.