Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@colincasey
Copy link
Contributor

Previously we could rely on knowing that packaged buildpacks would be written to a location within the target directory configured in Crate. This was easy to determine through program code and could be supplied to find_buildpack_dirs so that packaged buildpacks weren't accidentally included when searching for buildpacks.

With the changes introduced in #583 it is no longer possible to easily determine the output location for packaged buildpacks. This PR adds the ignore crate to provide directory iteration that respects standard ignore files. This will give the user the ability to configure where we search within a project for buildpacks.

Related to #666

Previously we could rely on knowing that packaged buildpacks would be written to a location within the `target` directory configured in Crate. This was easy to determine through program code and could be supplied to `find_buildpack_dirs` so that packaged buildpacks weren't accidentally included when searching for buildpacks.

With the changes introduced in [#583](#583) it is no longer possible to easily determine the output location for packaged buildpacks. This PR adds the [ignore](https://crates.io/crates/ignore) crate to provide directory iteration that respects standard ignore files. This will give the user the ability to configure where we search within a project for buildpacks.
Copy link
Member

@edmorley edmorley left a comment

Choose a reason for hiding this comment

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

Thank you for working on this!

Copy link
Member

@Malax Malax left a comment

Choose a reason for hiding this comment

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

My requested changes are the comments @edmorley made. ;-)

* updated error message
* using iterator instead of loop for finding buildpack dirs logic
* added a quick test to ensure that ignores work
* updated changelog entry
* updated error message
* using iterator instead of loop for finding buildpack dirs logic
* added a quick test to ensure that ignores work
* updated changelog entry
Copy link
Member

@Malax Malax left a comment

Choose a reason for hiding this comment

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

Two small comments, otherwise: ship it!

* updated test comments
* added PR link to changelog entry
@colincasey colincasey merged commit 31ec5af into main Sep 19, 2023
@colincasey colincasey deleted the find_buildpacks_with_ignore branch September 19, 2023 15:00
colincasey added a commit that referenced this pull request Sep 19, 2023
* main:
  Ignore file support when finding buildpacks (#673)
  Apply rustfmt to README example (#676)
  Update example `cargo libcnb package` log output in READMEs (#675)
  Add CLI usage help output to libcnb-cargo README (#674)
  Fix lint errors with Rust 1.73 (#672)
  Include README.md in lib.rs (#667)

# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants