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

Omit importer dependencies in docs-site workflow #501

Merged
merged 2 commits into from
Dec 3, 2022

Conversation

ashmaroli
Copy link
Member

Summary

Avoid installing importer dependencies and test-suite dependencies while building / deploying the documentation site.

Background

While setting-up Deploy Previews (on pull_request events) for the docs-site via Netlify. the build-image there failed to install certain gems with native=extensions due to missing dependencies of the native-code compiler.

Advantages

  • Lesser number of gems to install.
  • Using conditional block in the gemspec instead of a Bundler group in the Gemfile means dev-dependencies continue getting listed at the Rubygems.org page as is current behavior.

# Containing them within a conditional block in the gemspec instead of using a Bundler
# group in the Gemfile ensures that they remain listed in the page at Rubygems.org.

unless ENV["DOCS_DEPLOY"]
Copy link
Member

Choose a reason for hiding this comment

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

Bundler has first-class support for this kind of thing with groups. Would it make more sense to use groups?

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't the Ruby comment on the preceding lines stating exactly why I did not use a Bundler group or is the comment not clear enough..?

Copy link
Member

Choose a reason for hiding this comment

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

I see it now, yes. I have been reviewing on GitHub Mobile which does not show all the context – even less when you're working on a comment. Do you think listing the dev dependencies on RubyGems.org is doing anyone any good? I don't think I have ever looked at dev dependencies before... How would they know which dependencies are for each importer? I feel like folks would actually prefer this all on one page, on our docs site. So should we move these to the Gemfile and just leave it be? Since we're thinking about these things, could we do better documenting dependencies?

In terms of ergonomics, jekyll-import leaves a lot to be desired. The first time you run, you get an error since it's very unlikely you already have all the dependencies. Could we launch bundler and auto-install dependencies somehow? And we even ask users to run the Ruby interpreter and input a Ruby program. We don't even propose users use the CLI...

@parkr
Copy link
Member

parkr commented Dec 3, 2022

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 4babde5 into master Dec 3, 2022
@jekyllbot jekyllbot deleted the hide-dev-dependencies branch December 3, 2022 20:50
jekyllbot added a commit that referenced this pull request Dec 3, 2022
github-actions bot pushed a commit that referenced this pull request Dec 3, 2022
Ashwin Maroli: Omit importer dependencies in docs-site workflow (#501)

Merge pull request 501
@jekyll jekyll locked and limited conversation to collaborators Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants