Skip to content

Fix deprecation message for missing doc method#8960

Merged
jekyllbot merged 1 commit intojekyll:masterfrom
ashmaroli:improve-doc-data-call-deprecation
Feb 10, 2022
Merged

Fix deprecation message for missing doc method#8960
jekyllbot merged 1 commit intojekyll:masterfrom
ashmaroli:improve-doc-data-call-deprecation

Conversation

@ashmaroli
Copy link
Copy Markdown
Member

  • This is a 🐛 bug fix.
  • I've added tests.

Summary

The deprecation message issued when a key in document's data is called directly currently points to the Jekyll gem.
It should instead point to the offending location in the concerned plugin.

@ashmaroli ashmaroli requested a review from a team February 9, 2022 14:30
@parkr
Copy link
Copy Markdown
Member

parkr commented Feb 10, 2022

@ashmaroli the cucumber test matches single lines. What does the full output look like?

@parkr
Copy link
Copy Markdown
Member

parkr commented Feb 10, 2022

What does the full output look like?

Running a cucumber scenario with DEBUG=true in the command line outputs the Jekylll build output:

Configuration file: none
       Deprecation: Document#title is now a key in the #data hash.
                    Called by /Users/parker/code/jekyll/jekyll/tmp/jekyll/_plugins/foo.rb:2:in `block in <top (required)>'.
       Deprecation: Document#title is now a key in the #data hash.
                    Called by /Users/parker/code/jekyll/jekyll/tmp/jekyll/_plugins/bar.rb:3:in `dummy?'.

LGTM!

@parkr
Copy link
Copy Markdown
Member

parkr commented Feb 10, 2022

@jekyllbot: merge +fix

@jekyllbot jekyllbot merged commit 88044a2 into jekyll:master Feb 10, 2022
jekyllbot added a commit that referenced this pull request Feb 10, 2022
github-actions bot pushed a commit that referenced this pull request Feb 10, 2022
Ashwin Maroli: Fix deprecation message for missing doc method (#8960)

Merge pull request 8960
@ashmaroli ashmaroli deleted the improve-doc-data-call-deprecation branch February 10, 2022 06:53
@jekyll jekyll locked and limited conversation to collaborators Feb 10, 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.

4 participants