From henrik.bengtsson at gmail.com  Fri Mar  3 19:10:53 2017
From: henrik.bengtsson at gmail.com (Henrik Bengtsson)
Date: Fri, 3 Mar 2017 10:10:53 -0800
Subject: [Rd] Control statements with condition with greater than one
 should give error (not just warning) [PATCH]
In-Reply-To: <CABdHhvEh-nxwz6jeDCeQHB91a3BpVJA-P-8s5yyv3Xi40zkezA@mail.gmail.com>
References: <CAFDcVCRQVjqug-9TwWDNcFYOYYAxE1-E6G3VNmfCLNgPoLrEJQ@mail.gmail.com>
	<22713.42589.85552.452293@stat.math.ethz.ch>
	<CAFDcVCRwLgO46WdJ6=5jBsGb8z-6BGuAUoFVUcn1h0dg5rXmtQ@mail.gmail.com>
	<CABdHhvEh-nxwz6jeDCeQHB91a3BpVJA-P-8s5yyv3Xi40zkezA@mail.gmail.com>
Message-ID: <CAFDcVCSFXQWhfna8Vfn=jk-vV3-HWadWHW+T1Ljo8giRmS9uTw@mail.gmail.com>

On Fri, Mar 3, 2017 at 9:55 AM, Hadley Wickham <h.wickham at gmail.com> wrote:
>> But, how you propose a warning-to-error transition should be made
>> without wreaking havoc?  Just flip the switch in R-devel and see CRAN
>> and Bioconductor packages break overnight?  Particularly Bioconductor
>> devel might become non-functional (since at times it requires
>> R-devel).  For my own code / packages, I would be able to handle such
>> a change, but I'm completely out of control if one of the package I'm
>> depending on does not provide a quick fix (with the only option to
>> remove package tests for those dependencies).
>
> Generally, a package can not be on CRAN if it has any warnings, so I
> don't think this change would have any impact on CRAN packages.  Isn't
> this also true for bioconductor?

Having a tests/warn.R file with:

warning("boom")

passes through R CMD check --as-cran unnoticed.  Same with:

if (sample(2) == 1) message("It's your lucky day today!")

/Henrik

PS. Does testthat signal that?

>
> Hadley
>
> --
> http://hadley.nz



[Rd] Control statements with condition with greater than one should give error (not just warning) [PATCH]
Henrik Bengtsson