I had this errors marked after sending a PR: ERROR: recipes/gtfsort/meta.yaml:18:…
- User
I had this errors marked after sending a PR:
ERROR: recipes/gtfsort/meta.yaml:18: version_constraints_missing_whitespace: Packages and their version constraints must be space separated ERROR: recipes/gtfsort/meta.yaml:0: missing_run_exports: Recipe should have a run_exports statement that ensures correct pinning in downstream packages Errors were found
this is my meta.yaml:
{% set version = "0.2.1" %}
package: name: gtfsort version: {{ version }}
source: url: https://github.com/alejandrogzi/gtfsort/archive/refs/tags/v.{{ version }}.tar.gz sha256: 0fdaa15e22bd34193e2b16b53697b413af0fcf485401f45d48ac48054f1d70f4
build: number: 0 script: cargo install --path . --root $PREFIX
requirements: build: - {{ compiler("cxx") }} - rust>=1.39 - pkg-config host: run:
test: commands:
- gtfsort --help
- gtfsort --version
about: home: https://github.com/alejandrogzi/gtfsort license: MIT summary: "A chr/pos/feature GTF sorter that uses a lexicographically-based index ordering algorithm."
extra: recipe-maintainers: - alejandrogzi
- Assistant
Based on the errors you have received, here are the corrections needed for your
meta.yamlfile:-
Packages and their version constraints must be space separated: This means that when you're specifying a package version constraint, there should be a space between the package name and the version specifier.
-
Recipe should have a run_exports statement to ensure correct pinning: The
run_exportsfield is used to make sure that consumers of your package (i.e., packages that list your package as a dependency) will be pinned to a suitable version that is compatible with the one they built against.
Here's a corrected version of your
meta.yamladdressing these two errors:{% set version = "0.2.1" %} package: name: gtfsort version: {{ version }} source: url: https://github.com/alejandrogzi/gtfsort/archive/refs/tags/v{{ version }}.tar.gz sha256: 0fdaa15e22bd34193e2b16b53697b413af0fcf485401f45d48ac48054f1d70f4 build: number: 0 script: cargo install --path . --root $PREFIX # Add run_exports here run_exports: # Specify appropriate pinning here, this is an example - {{ pin_subpackage('gtfsort', max_pin='x.x.x') }} requirements: build: - {{ compiler("cxx") }} - rust >=1.39 - pkg-config host: run: test: commands: - gtfsort --help - gtfsort --version about: home: https://github.com/alejandrogzi/gtfsort license: MIT summary: "A chr/pos/feature GTF sorter that uses a lexicographically-based index ordering algorithm." extra: recipe-maintainers: - alejandrogziChanges:
- I removed the period from the URL in the
sourcesection (it should bev{{ version }}instead ofv.{{ version }}). - I added a space after
rustinrequirements: build:to separate it from its version constraint. - I added a
run_exportssection in thebuild:section. You should specify what kind of pinning you want to apply. Above,max_pin='x.x.x'is used as an example. You need to replace it with the appropriate pinning scheme based on your package versioning and compatibility policy.
Make sure that you review the version pinning you want to apply to your
run_exportsstatement according to your package's compatibility with future versions. This is crucial for proper dependency management when your package is used as a dependency in other environments. -