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

file resolution #36

Closed
nrolland opened this issue Jan 27, 2013 · 2 comments
Closed

file resolution #36

nrolland opened this issue Jan 27, 2013 · 2 comments

Comments

@nrolland
Copy link

I use the example in a build.fsx file

type Stocks = CsvProvider<"data/MSFT.csv">
...

it compiles with no pb. I now run this through Fake

.\tools\FAKE\tools\Fake.exe "build.fsx"

where build.fsx is the previous file.
This leads to an error
build.fsx(12,15): error FS3033: The type provider 'ProviderImplementation.CsvProvider' reported an error: The input sequ
ence was empty. Parameter name: source

  • There should be more information about which resolved file the TP was trying to open.
  • Even after copying data/MSFT.csv to the Fake.exe folder, I have the error so I am quite puzzled actually.

I switched to absolute path of course, but that is far from ideal for scripting purposes in shared environment. That would be bad to loose strong type safety because of environment variable :)

(btw, staged execution would not have this pb I guess as in that case I'd generate the metastage before running the fake.exe, removing exposure to environment change influencing type generation)

@tpetricek
Copy link
Member

I'm not sure how Fake.exe works, but there should be some way to specify the root path (that is used when resolving all references in F# Interactive - assuming Fake actually runs fsi.exe under the cover).

If Fake.exe does not have anything like that, the fsi.exe has a hidden command that Visual Studio uses to change the current directory, so you can try running the following at the beginning of the script:

# silentCd @"D:\Users\Tomas\AppData\Local\Temp" ;; 

@tpetricek
Copy link
Member

Merged the pull request by @ovatsus, so you should get a more useful error message (hopefuly!) Can you please check what you get now?

I'll close this, but let us know if it does not give you more information and we can do some more improvements in the reporting. The rest is a matter of telling FAKE how to locate the files, which is an issue for FAKE (if there is no way to do that).

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