Is there any way to stop the numerous deprecation warnings when using the remote theme installation approach of this template/theme and building the resulting site?
E.g. I'm using the remote theme installation approach of adding remote_theme: mmistakes/minimal-mistakes to _config.yaml and the gem "github-pages", group: :jekyll_plugins etc. entry in Gemfile as per the doco. Everything technically works fine, however every time jekyll rebuilds the site I get dozens of
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-3.8.5/lib/jekyll/tags/include.rb:194: warning: Using the last argument as keyword parameters is deprecated
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-3.8.5/lib/jekyll/tags/include.rb:194: warning: Using the last argument as keyword parameters is deprecated
/usr/local/lib/ruby/gems/2.7.0/gems/jekyll-3.8.5/lib/jekyll/tags/include.rb:194: warning: Using the last argument as keyword parameters is deprecated
...
messsages. I can't see the real errors from the noise, which is annoying. This is a known issue https://github.com/jekyll/jekyll/issues/7947 and the solution I have been using in other homegrown simple jekyll projects which silences these warnings is to install jekyll from github master with this Gemfile entry:
gem "jekyll", github: "jekyll/jekyll"
however this solution doesn't work when using this minimal-mistakes theme / project - due to a whole bunch of dependency incompatibilities. Is there a solution or workaround to this?
A workaround or at least an acknowledgement of this issue in the docs would be reassuring.
You're using Ruby 2.7 where "using the last argument (a Hash) as keyword parameters" starts being deprecated (it'll be removed in Ruby 3).
Googling for ruby 2.7 deprecation warnings gives abundant results about this, most of which suggests adding this environment variable:
RUBYOPT='-W:no-deprecated -W:no-experimental'
That environment variable workaround doesn't seem to work with bundle commands.
Issuing the one-liner RUBYOPT='-W:no-deprecated' bundle exec jekyll serve doesn't work either - still getting dozens of deprecation warnings.
This seems to do the trick:
bundle exec jekyll serve 2>&1 | egrep -v 'deprecated|other_annoying_word'
This issue has been automatically marked as stale because it has not had recent activity.
If this is a bug and you can still reproduce this error on the master branch, please reply with any additional information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.
Jekyll-4.0.0 seems to be the released current version, and not some experimental nightly build. I don't think that it's acceptable for users running the released version of a software package to be bombarded by 158 (yes, I counted them) deprecation warnings. These should have been dealt with, or turned off, by the developers of Jekyll before releasing it.
There is no point in the Jekyll user seeing these messages: there is nothing for them to do other than wait for the Jekyll developers to update their code. And all of those warnings seem to come from just 5 places in the code ... why not fix them?
... jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: Using the last argument as keyword parameters is deprecated
... jekyll-4.0.0/lib/jekyll/document.rb:432: warning: Passing the keyword argument as the last hash parameter is deprecated
... jekyll-4.0.0/lib/jekyll/document.rb:439: warning: Passing the keyword argument as the last hash parameter is deprecated
... jekyll-4.0.0/lib/jekyll/document.rb:466: warning: Using the last argument as keyword parameters is deprecated
... jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: Using the last argument as keyword parameters is deprecated
I'm sure there's nothing Minimal Mistakes, as a theme, can do. You definitely should ask Jekyll about this. For the record, there's already an issue closed: jekyll/jekyll#8077.
@apblack FYI: Jekyll 4.0 was released in August 2019 while Ruby 2.7 was in December 2019. No way for "the developers of Jekyll before releasing it". This has since been fixed in the latest development version of Jekyll (see the issue linked above), but 4.1 hasn't been released yet.
@mmistakes Recommend close as nothing to do with your theme.
Most helpful comment
This seems to do the trick: