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

add way to deprecate Theme fields and fix 4542f3fb #1180

Merged
merged 1 commit into from
Aug 19, 2018

Conversation

bjarthur
Copy link
Member

fixes #1175 (comment) by adding another entry to the varset table that contains a depwarn string

@bjarthur bjarthur mentioned this pull request Aug 18, 2018
4 tasks
@bjarthur bjarthur requested a review from tlnagy August 18, 2018 13:29
var = row.args[hasdocstr+1]
typ = row.args[hasdocstr+2]
default = length(row.args)-hasdocstr > 2 ? row.args[hasdocstr+3] : :nothing
depwarnstr = length(row.args)-hasdocstr > 3 ? row.args[hasdocstr+4] : ""
Copy link
Member

Choose a reason for hiding this comment

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

So the only thing that determines whether something is deprecated or not is whether it has another docstring line following it? I was thinking that you could explicitly use syntax similar to the @deprecated macro (like explicitly have @deprecated in the first position of the line with the alt text) and then to do some processing to determine whether it's present. It would be nice to be super clear that something is deprecated when looking at the source.

Copy link
Member Author

Choose a reason for hiding this comment

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

i've added docs to the top of src/varset.jl to explain the format of the table.

function $(name)($(parameters_expr))
$(depwarns...)
return $(name)($(parsed_vars...))
end
Copy link
Member

Choose a reason for hiding this comment

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

I like this approach and this should scale well in the future.

@codecov-io
Copy link

Codecov Report

Merging #1180 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1180      +/-   ##
==========================================
- Coverage   87.33%   87.33%   -0.01%     
==========================================
  Files          34       34              
  Lines        4082     4081       -1     
==========================================
- Hits         3565     3564       -1     
  Misses        517      517
Impacted Files Coverage Δ
src/theme.jl 67.3% <ø> (-1.22%) ⬇️
src/varset.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fadca20...1566b93. Read the comment docs.

@bjarthur bjarthur merged commit 338fe77 into GiovineItalia:master Aug 19, 2018
@bjarthur bjarthur deleted the bja/fixdepwarn branch August 19, 2018 02:58
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.

3 participants