[Rd] Detect UCRT-built R from within R sessions (and in configure.win)
yut@n|@|n| @end|ng |rom gm@||@com
Mon Sep 20 11:03:05 CEST 2021
I tried to use configure.ucrt, and found it results in the following
NOTE on the released version of R, unfortunately.
* checking top-level files ... NOTE
Non-standard file/directory found at top level:
Will this be accepted by CRAN if I submit a package that contains
configure.ucrt? Or, is it too early to use it in a CRAN package?
In either case, while I don't have a strong opinion here, I'm starting
to feel that it might be preferable to provide an environmental
variable rather than creating ".ucrt" versions of files. In my
understanding, the plan is to switch all the Windows R to UCRT at some
point in future. But, it's not clear to me how to unify these ".win"
files and ".ucrt" files smoothly.
2021年9月14日(火) 23:44 Hiroaki Yutani <yutani.ini using gmail.com>:
> Thanks for both, I'll try these features.
> 2021年9月14日(火) 22:40 Tomas Kalibera <tomas.kalibera using gmail.com>:
> > On 9/9/21 5:54 AM, Hiroaki Yutani wrote:
> > Thank you for the prompt reply.
> > > There in not such a mechanism, yet, but can be added, at least for
> > > diagnostics.
> > For example, can R.version somehow contain the information?
> > Yes, now added to the experimental builds. R.version$crt contains "ucrt" (and would contain "msvcrt" if R was built against MSVCRT).
> > > We could add support for configure.ucrt, which would take precedence
> > > over configure.win on the UCRT builds (like Makevars.ucrt takes
> > > precedence over Makevars.win). Would that work for you?
> > Yes, configure.ucrt should work for me. There might be someone who prefers to switch by some envvar rather than creating another file, but I don't have a strong opinion here.
> > The experimental builds now support configure.ucrt and cleanup.ucrt files.
> > Best
> > Tomas
> > Best,
> > Hiroaki Yutani
> > 2021年9月9日(木) 0:48 Tomas Kalibera <tomas.kalibera using gmail.com>:
> >> On 9/8/21 2:08 PM, Hiroaki Yutani wrote:
> >> > Hi,
> >> >
> >> > Are there any proper ways to know whether the session is running on
> >> > the R that is built with the UCRT toolchain or not? Checking if the
> >> > encoding is UTF-8 might do the trick, but I'm not sure if it's always
> >> > reliable.
> >> There in not such a mechanism, yet, but can be added, at least for
> >> diagnostics.
> >> You are right that checking for UTF-8 encoding would not always be
> >> reliable. For example, the version of Windows may be too old to allow R
> >> use UTF-8 as native encoding (e.g. Windows server 2016), then R will use
> >> the native code page as it does today in the MSVCRT builds.
> >> > Also, I'd like to know if there's any mechanism to detect the UCRT in
> >> > configure.win. I know there are Makevars.ucrt and Makefile.ucrt, but
> >> > one might want to do some feature test that is specific to the UCRT
> >> > toolchain.
> >> We could add support for configure.ucrt, which would take precedence
> >> over configure.win on the UCRT builds (like Makevars.ucrt takes
> >> precedence over Makevars.win). Would that work for you?
> >> Best
> >> Tomas
> >> >
> >> > Best,
> >> > Hiroaki Yutani
> >> >
> >> > ______________________________________________
> >> > R-devel using r-project.org mailing list
> >> > https://stat.ethz.ch/mailman/listinfo/r-devel
More information about the R-devel