Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions recipes/emberjson/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
context:
version: 0.1.6
version: 0.1.7
mojo_version: "=25.5"

package:
name: "emberjson"
version: ${{ version }}

source:
- git: https://github.com/bgreni/EmberJson.git
rev: c12f69c21311807ddb998ca1a75be0db0ac2f8dc
rev: 0700a32337a7f348d92434240e52a62b881e92b3

build:
number: 0
Expand All @@ -16,15 +17,22 @@ build:

requirements:
host:
- max =25.4
Copy link
Collaborator

Choose a reason for hiding this comment

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

suggestion: use mojo-compiler package now that it's released instead.
suggestion: add a requirements.build section that also specifies mojo-compiler.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call! What's the purpose of adding the requirements.build entry?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just completeness! https://pixi.sh/latest/reference/pixi_manifest/#host-dependencies

build - things that are executed at build time (compilers)
host - stuff that is linked against
run - stuff that you need around at runtime

We link against stuff supplied by the mojo-compiler package so technically we don't need to specify it as a build dep, but it makes the packages more robust to tooling changes by prefix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bgreni is there a reason you picked the mojo pkg over mojo-compiler for the run and host? mojo bundles in the LSP, formatter, and debugger. https://forum.modular.com/t/mojo-now-available-in-conda-as-a-standalone-package/2052

Copy link
Collaborator

Choose a reason for hiding this comment

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

Learning as I go here, but it seems like mojo test does not work correctly if just the mojo-compiler package is installed. So for tests specifying mojo is needed.

- mojo-compiler ${{ mojo_version }}
build:
- mojo-compiler ${{ mojo_version }}
run:
- ${{ pin_compatible('max') }}
- ${{ pin_compatible('mojo-compiler') }}

tests:
- script:
- if: unix
then:
- mojo test
requirements:
build:
- mojo ${{ mojo_version }}
run:
- mojo ${{ mojo_version }}

about:
homepage: https://github.com/bgreni/EmberJson
Expand Down
Loading