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

Fix MockInfoProperty to mimic list interface #12673

Merged
merged 2 commits into from
Dec 7, 2022

Conversation

jcar87
Copy link
Contributor

@jcar87 jcar87 commented Dec 7, 2022

Usage of this in recipes:

self.env_info.PATH.append("/path/to/folder")

is failing in 2.0.0b6 with the following error:

'NoneType' object has no attribute 'append'

because the env_info accessor was not returning an object with a list-like interface. The 1.x implementation would have returned an empty list, so this does the same - still with no consequence as usage of env_info in 2.0 is a no-op.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably is good enough atm, if there are some more failing cases, we can try to provide a more powerful Mock

@jcar87 jcar87 marked this pull request as ready for review December 7, 2022 15:54
@jcar87 jcar87 merged commit 8aa8282 into conan-io:develop2 Dec 7, 2022
@jcar87 jcar87 deleted the bugfix/mock-envinfo-property branch December 7, 2022 15:54
@prince-chrismc
Copy link
Contributor

🚀

System-Arch added a commit to System-Arch/conan-center-index that referenced this pull request Dec 8, 2022
conan-center-bot pushed a commit to conan-io/conan-center-index that referenced this pull request Jan 27, 2023
* M4 Conan 2.0 compatibility

* Restore v1 support for M4 env. var.

* Set env_info.PATH in Conan 2 compatible manner

* Removed cond. logic for self.output.PATH.append (see conan-io/conan#12673)

* Added workaround for Conan issue #12685

* Tweaked how win_bash is set

* Removed workaround for Conan issue #12685 (fixed in beta8)

* Fixed lint issue

* Conan 2.0 renamed output in self.run()

* Bumped required_conan_version to clear "failed" label

* Removed optional bootstrap support per CCI decision

* Removed import for chdir

* Removed handling of COPYING as symlink (which it is in Git repo)
StellaSmith pushed a commit to StellaSmith/conan-center-index that referenced this pull request Feb 2, 2023
* M4 Conan 2.0 compatibility

* Restore v1 support for M4 env. var.

* Set env_info.PATH in Conan 2 compatible manner

* Removed cond. logic for self.output.PATH.append (see conan-io/conan#12673)

* Added workaround for Conan issue conan-io#12685

* Tweaked how win_bash is set

* Removed workaround for Conan issue conan-io#12685 (fixed in beta8)

* Fixed lint issue

* Conan 2.0 renamed output in self.run()

* Bumped required_conan_version to clear "failed" label

* Removed optional bootstrap support per CCI decision

* Removed import for chdir

* Removed handling of COPYING as symlink (which it is in Git repo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants