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

Test H and inline-r on windows in CI #397

Open
facundominguez opened this issue Jan 24, 2023 · 2 comments
Open

Test H and inline-r on windows in CI #397

facundominguez opened this issue Jan 24, 2023 · 2 comments

Comments

@facundominguez
Copy link
Member

Currently, we don't test H in CI. This ticket is about producing some simple test for H and running it in CI together with the tests for inline-r on Windows.

@djsamperi
Copy link
Contributor

I installed under Windows using several recent versions of R (up to and including 4.2.2)
and the usual 'stack exec H' did not work for me. Modules could not be found,
or R complains about bad input.

@djsamperi
Copy link
Contributor

djsamperi commented Jan 27, 2023

Here is more info on the problem. I'm using Windows 11, with ghc 9.2.5, and R-4.2.2.

Following the instructions at tweag.github.io/HaskellR, H installs without problems, but
'stack exec H' results in a ghci> prompt instead of the usual H> prompt. When I enter
the quasi quote [r|2|], I get this...

An error occurred while trying to parse the R code. The stderr of the R interpreter was:
Error: '\U' used without hex digits in character string starting ""C:\u"

Googling for the error string results in about 500,000 results. The problem arises because a string with Windows-style backslashes is provided, as in read.csv("C:\Users\bob\test.csv"). The work-around is to use forward slashes, or escapes,
that is, use double backslashes. I tried specifying the input directories for extra-include-dirs and extra-lib-dirs using forward
slashes and compressed names (PROGRA~1 instead of "Program Files"), and H was installed without problems, but
the same hex error message appears.

In a different scenario, if I do not clone the files from the HaskellR repository, and simply issue the stack install command
using global configs, H installs without error, but 'stack exec H' leads to...

<no location info>: error:
Could not find module 'H.Prelude.Interactive'
It is not a module in the current program, or in any known package.

<interactive>:21:1: error:
Not in scope: 'Language.R.Instance.initialize'
No module name 'Language.R.Instannce' is imported.

<interactive>:21:32: error:
Not in scope: 'Language.R.Instance.defaultConfig'
No module named 'Language.R.Instance is imported.

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

No branches or pull requests

2 participants