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

proposing base_source_folder, and folders.root #10654

Merged
merged 13 commits into from Mar 1, 2022

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Feb 24, 2022

Changelog: Feature: Adding self.base_source_folder for exports_sources explicit layouts.
Changelog: Feature: Adding root to layout model to allow conanfile.py in subfolders.
Docs: conan-io/docs#2418

@memsharded memsharded marked this pull request as ready for review February 24, 2022 12:28
@memsharded memsharded added this to the 1.46 milestone Feb 24, 2022
Copy link
Contributor

@lasote lasote left a comment

Choose a reason for hiding this comment

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

I would try to make it a bit more self-explanatory because it is not easy to understand at all .


def __repr__(self):
return str(self.__dict__)

def set_local(self, conanfile_folder, output_folder):
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe set_base_folders? I don't know why set_local

Copy link
Contributor

Choose a reason for hiding this comment

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

Also a docstring would be nice. It is not easy to understand the arguments and the sense they have.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is only called from local flow, never in the cache. I tried to convey that meaning. I can try to rename to something like set_local_base_folders() and I will add docstring.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if "from where I call it" should be the thing naming the function rather than the thing that the function does.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed the method, and added a bunch of docstrings and comments in b6971ba, please re-review and let me know

conans/model/layout.py Show resolved Hide resolved
memsharded and others added 10 commits February 25, 2022 18:58
Co-authored-by: Luis Martinez <lasote@gmail.com>
* first approach. Big changes in Conf

* Fixing errors

* Fixing more tests

* Deleted useless iteration

* All the tests passing

* Testing

* Added items method

* fixed rebased

* Keeping old functions for backward compatibility

* backward compatibility

* Keeping indentation

* Ordering methods and improved legacy logic

* Added fixme

* Reverted breaking changes

* Added more complete test

* Added more access Conf tests

* Added docstring

* Splitted string asserts

* Added get/pop functions

* Breaking refactor. Trying new structure

* fixing tests

* Changing tests

* Fixed tests

* Fixed Python 2.x problems

* Removed useless layer of types

* Fixed py2

* Fixed errors and added cast param to apply function to convert any type

* Added TODO

* Improved docstring

* Fixed error

* Update conans/model/conf.py

Co-authored-by: James <james@conan.io>

* Update conans/model/conf.py

Co-authored-by: James <james@conan.io>

* Added check_type and removed cast

* Changed main structure. Now simpler and more powerful

* Explicit default

* Fixed error

* Simplified compile options

* Changed all the legacy conf getitem built-ins

* Fixed test

* Fixed bad type

* Added more tests

* More tests

* Fix test for Python2

* Added more tests. Fixed corner-cases

* Added one cli test and improved boolean conf UX

* Moved str conveersion

* Added one more mechanism to other smart conversion. Added more tests

* Removed useless OR

Co-authored-by: James <james@conan.io>
* Added custom versions and descriptions for components

* Changed property to component_version. Backported to legacy PkgConfig
* WIP: Test failing

* output_folder absolute only when existing

* Fix test windows
* use absolute path

* Update conans/test/integration/environment/test_env.py

Co-authored-by: James <james@conan.io>

* fix tests

* fix test

* fix win

* fix win

Co-authored-by: James <james@conan.io>
Co-authored-by: James <james@conan.io>
@memsharded memsharded closed this Feb 28, 2022
@memsharded memsharded reopened this Feb 28, 2022
@memsharded memsharded closed this Feb 28, 2022
@memsharded memsharded reopened this Feb 28, 2022
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.

None yet

5 participants