-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Poetry includes git-ignored files in build. #8316
Comments
poetry asks git what it is ignoring, here you can check for yourself whether the files that you are seeing are included or not, either by putting some print statements in that code or something like:
from the top of your project |
@dimbleby ☁ elementary [master] ⚡ git --git-dir .git --work-tree . ls-files --others -i --exclude-standard
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.circleci/config.yml
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/CODEOWNERS
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/ISSUE_TEMPLATE/bug_report.md
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/ISSUE_TEMPLATE/dbt_minor_release.md
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/ISSUE_TEMPLATE/feature_request.md
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/ISSUE_TEMPLATE/utils_minor_release.md
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.github/pull_request_template.md
elementary/monitor/dbt_project/dbt_packages/dbt_utils/.gitignore
... Why are they included? |
I've shown you where the code is, please investigate this yourself. |
FYI I fixed a bug that may be related to this. Try the latest poetry-core release and see if that fixes it. |
Fixed by python-poetry/poetry-core#611 |
Hi @jameshilliard @finswimmer, this still occurs to me on the latest release. Essentially what happens is that I have a Poetry package in which there is a |
The fix was not released yet. This will be available in the next release |
Got it, thanks a lot for updating.
I have an API project (Poetry) and a Common package (also Poetry). Thanks. |
Is the nested directory itself being entirely ignored by the project it is nested within? The purpose of #611 is to disable gitignore usage for cases when the nested directory is entirely ignored(as doing so would always result in an empty package). |
The problem is that it is not ignored but rather included when it shouldn't be. |
Well it the project root is ignored, then poetry will disable the use of gitignore handling entirely. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
We're using a tool called
dbt
within our Python package and it has a package management system. Packages are stored in a directory calleddbt_packages
and they're git-ignored in our repository. However, when runningpoetry build
, it seems to still be included in the final build and I don't understand why because according to the docs:Here's the evidence:
I also tried moving the git-ignored records to the root of the repository but it still included them.
Why does this happen?
Thanks.
The text was updated successfully, but these errors were encountered: