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

Adds tea.yml support. closes #201 #204

Closed
wants to merge 5 commits into from

Conversation

jakenvac
Copy link

@jakenvac jakenvac commented Nov 26, 2022

closes #201

What

This PR adds support for a tea.yml and .github/tea.yml config file to drive magic functionality. The schema for the yml file copies that of the existing package.json support.

Eg.

  • tea.yml
version: 1.0.1
tea:
  dependencies:
    nodejs.org: 19
    go.dev: 1.19
  • package.json
{
  "version": "1.0.1",
  "dependencies": {
    "nodejs.org": 19,
    "go.dev": "1.19"
  }
}

TODO:

  • Add tea.yml loader
  • Refactor json logic to support yaml and share schema
  • Move common requirements logic/types to sr/common/ directory
  • Investigate existing behavior whereby a package.json (and now a tea.yml) will prevent markdown scripts from running.
    • I would consider this out of the scope of this ticket. I'll create an issue.
      running touch package.json in the root of the cli repo will break commands such as tea install-self
  • Understand what the version in the config is for
    • It's the version of the project using tea, semver string. got it!
  • Remove junky console logs
  • Update docs
  • .github/tea.yml support
  • UX - Do we want to let the user know which file has been loaded?
  • fix failing tests
  • add new tests?

@what-the-diff
Copy link

what-the-diff bot commented Nov 26, 2022

  • Added a new file src/common/requirementsCandidate.ts
  • Modified the existing files:
    • src/hooks/useRequirementsFile.ts (line 1) to import from common folder and use it's types, functions etc...
    • src/hooks/useVirtualEnv.ts (lines 52-53) to build requirements candidates using function exported by src\common\requirementsCandidate. This is done because we need this list in two places now instead of one as before when only README was considered for dependencies table search but not TEA_YAML or package json which are also valid sources of dependency information now!

@mxcl
Copy link
Member

mxcl commented Dec 21, 2022

I've come round to this provided we use package.yml thus we are being consistent with our longer term goals.

@jakenvac
Copy link
Author

Sounds good to me! I'm away for Xmas at the moment but I'll set time aside for this in a week or so.

@mxcl mxcl force-pushed the main branch 2 times, most recently from b04e33f to 0a09f43 Compare February 11, 2023 13:29
@mxcl
Copy link
Member

mxcl commented Feb 12, 2023

tea.yml or tea.yaml support officially dropped in 0.23.

@mxcl mxcl closed this Feb 12, 2023
@dudicoco
Copy link

@mxcl can you please elaborate why support for tea.yaml was dropped?
It's still in the docs: https://docs.tea.xyz/features/developer-environments#supported-files

How can we manage versions declaratively without it? Version files such as .node-version do not exist for all packages and even if they do tea doesn't support all of them.

@jhheider
Copy link
Contributor

I believe he means it "dropped", was released, rather than "was dropped", discarded. Indeed, tea.yaml is present and functional in teaxyz/pantry.

@mxcl
Copy link
Member

mxcl commented May 10, 2023

Yes sorry to be confusing. I meant it went live. We will be keeping this feature forever!

@dudicoco
Copy link

Thanks @jhheider @mxcl.

It seems that the tea.yaml parameters are not documented anywhere.

Also, is it possible to install all of the dependencies specified in the file like with brew bundle?

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.

Allow a dedicated dependency file for magic (not package.json or readme)
4 participants