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

recognize _brand.ya?ml as part of a Quarto project #565

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

cscheid
Copy link
Contributor

@cscheid cscheid commented Oct 7, 2024

This closes #483.

It requires quarto-dev/quarto-cli#11006 to be merged for it to work.

There's also an issue we haven't had to deal with before, which is how should different versions of the extension interact with different versions of quarto-cli. Right now, if the extension is "too new" for the cli, _brand.yml will be validated as if it were _quarto.yml or _metadata.yml. Not horrible, but not ideal. I wonder if we have a mechanism for addressing this.

@cscheid
Copy link
Contributor Author

cscheid commented Oct 7, 2024

@juliasilge Nothing too special here, but I wanted to flag that versioning issue I brought up above as something we eventually need to sort out company-wide.

@juliasilge
Copy link
Collaborator

I may be misunderstanding the particulars of the versioning, but is it possible to check the cli version and gate the new extension behavior on new-enough cli? Like this:

if (semver.gte(this.quartoContext_.version, rPkgRequiredVersion)) {

@cscheid
Copy link
Contributor Author

cscheid commented Oct 8, 2024

I was thinking more generally about what to do when Posit's product releases don't quite align; is there something we can do as a company to avoid this kind of code? I imagine it'll make everyone's codebases that much more annoying to test.

Nevertheless, yes: right now I should use precisely QuartoContext.version. Thanks!

@juliasilge
Copy link
Collaborator

is there something we can do as a company to avoid this kind of code?

For tools inside of one ecosystem (R packages, Python packages, etc) there are of course native tools to manage these kinds of version dependencies. It's an interesting question for cross-ecosystem tooling!

@cscheid cscheid merged commit 4765f12 into main Oct 8, 2024
@cscheid cscheid deleted the feature/brand-yaml-validation branch October 8, 2024 17:33
cscheid added a commit that referenced this pull request Oct 8, 2024
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.

yaml intelligence: _brand.yml
2 participants