spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Cheung (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SPARK-22281) Handle R method breaking signature changes
Date Mon, 23 Oct 2017 07:11:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-22281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16214751#comment-16214751
] 

Felix Cheung edited comment on SPARK-22281 at 10/23/17 7:10 AM:
----------------------------------------------------------------

ok, I have a solution for both. it turns out the fix for glm is quite a bit different from
attach, so I added the error above.

With attach, we need to match the signature of base::attach, since it changes we are going
to generate the signature at runtime by pulling from base::attach directly.

in short, with glm it's pulling in the function definition (ie. "usage") from the stats::glm
function. Since this is "compiled in" when we build the source package into the .Rd, when/if
it changes at runtime or in CRAN check it won't match the latest signature.


was (Author: felixcheung):
ok, I have a solution for both. it turns out the fix for glm is quite a bit different from
attach, so I added the error above.

in short, with glm it's pulling in the function definition (ie. "usage") from the stats::glm
function. Since this is "compiled in" when we build the source package into the .Rd, when/if
it changes at runtime or in CRAN check it won't match the latest signature.

> Handle R method breaking signature changes
> ------------------------------------------
>
>                 Key: SPARK-22281
>                 URL: https://issues.apache.org/jira/browse/SPARK-22281
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 2.2.1, 2.3.0
>            Reporter: Felix Cheung
>
> cAs discussed here
> http://apache-spark-developers-list.1001551.n3.nabble.com/VOTE-Spark-2-1-2-RC2-tt22540.html#a22555
> this WARNING on R-devel
> * checking for code/documentation mismatches ... WARNING
> Codoc mismatches from documentation object 'attach':
> attach
>   Code: function(what, pos = 2L, name = deparse(substitute(what),
>                  backtick = FALSE), warn.conflicts = TRUE)
>   Docs: function(what, pos = 2L, name = deparse(substitute(what)),
>                  warn.conflicts = TRUE)
>   Mismatches in argument default values:
>     Name: 'name' Code: deparse(substitute(what), backtick = FALSE) Docs: deparse(substitute(what))
> Codoc mismatches from documentation object 'glm':
> glm
>   Code: function(formula, family = gaussian, data, weights, subset,
>                  na.action, start = NULL, etastart, mustart, offset,
>                  control = list(...), model = TRUE, method = "glm.fit",
>                  x = FALSE, y = TRUE, singular.ok = TRUE, contrasts =
>                  NULL, ...)
>   Docs: function(formula, family = gaussian, data, weights, subset,
>                  na.action, start = NULL, etastart, mustart, offset,
>                  control = list(...), model = TRUE, method = "glm.fit",
>                  x = FALSE, y = TRUE, contrasts = NULL, ...)
>   Argument names in code not in docs:
>     singular.ok
>   Mismatches in argument names:
>     Position: 16 Code: singular.ok Docs: contrasts
>     Position: 17 Code: contrasts Docs: ...
> Checked the latest release R 3.4.1 and the signature change wasn't there. This likely
indicated an upcoming change in the next R release that could incur this new warning when
we attempt to publish the package.
> Not sure what we can do now since we work with multiple versions of R and they will have
different signatures then.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message