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

Project hardcodes things for Windows #7

Open
oscarvarto opened this issue Sep 23, 2017 · 1 comment
Open

Project hardcodes things for Windows #7

oscarvarto opened this issue Sep 23, 2017 · 1 comment

Comments

@oscarvarto
Copy link

Hi!

I have interest in learning Suave development from guide, but I haven't been able to get the v2.0 and v2.0_src branch working on Linux. For example, I cannot generate the documentation. At the moment I'm developing on Ubuntu 16.04 LTS.

I'm not a experienced FSharp, FAKE, PAKET user, so I am asking for help to get this working. I am willing to contribute with some guidance, please.

I haven't been able to get recent documentation from v2.0_src.
Linux/Unix users (yesterday I also failed to build on Mac OS X) need better instructions on how to get a repeatable build.

  • There is no build.sh equivalent for https://github.com/theimowski/SuaveMusicStore/blob/v2.0/build.cmd. I am using $ fsharpi build.fsx Preview, but maybe something else should be used.
  • For example, it seems that we need to define APPDATA and AppLocalData environment variables, and to point both to (where?). I'm pointing that to $HOME. There is no chech if any of those are defined.
  • This line assumes a Windows environment: https://github.com/theimowski/SuaveMusicStore/blob/v2.0/build.fsx#L469
  • The build doesn't check for the existence of an out directory, neither it attempts to create it if it doesn't exist.
  • The build doesn't seem to take into account the possibility of the user already having some prerequisites installed in his system (npm, gitbook-cli, calibre, to get ebook-convert)

When I try with $ fsharpi build.fsx Preview I got the following error (after I hardcoded
let gitbook = Environment.ExpandEnvironmentVariables @"/usr/lib/node_modules/gitbook-cli/bin/gitbook.js"
here https://github.com/theimowski/SuaveMusicStore/blob/v2.0/build.fsx#L469

fsharpi build.fsx Preview                                     1 ↵  508  10:48:23
FSharp.Formatting Information: 0 : FSharp.Formatting Logging setup!
Yaaf.FSharp.Scriping Information: 0 : Yaaf.FSharp.Scripting Logging setup!


/home/oscarvarto/gitRepos/dotnetWork/SuaveMusicStore/build.fsx(152,13): warning FS0025: Incomplete pattern matches on this expression. For example, the value 'SnippetLinesBounded (_, _)' may indicate a case not covered by the pattern(s).

Building project with version: LocalBuild
Shortened DependencyGraph for Target All:
<== All
   <== Preview
      <== Idle

The resulting target order is:
 - Idle
 - Preview
 - All
Starting Target: Idle
Finished Target: Idle
Starting Target: Preview (==> Idle)

dirs to watch: ["/home/oscarvarto/gitRepos/dotnetWork/SuaveMusicStore/en"]
watching dir: /home/oscarvarto/gitRepos/dotnetWork/SuaveMusicStore/en

FileNotFoundError: No "README" file (or is ignored)
[10:48:45 INF] Smooth! Suave listener started in 103.186 with binding 127.0.0.1:8083
Created new window in existing browser session.

I can see a blank web page launched in my browser, but cannot see anything else.

@theimowski
Copy link
Owner

Hi,

TBH preview for the tutorial has been only tested on Win box, so probably it's not possible to run the build on *nix right now. I'm planning however to extract the core logic for generating the tutorial to a common library, but that might take some time.

Meanwhile, you can have a look at contribution guideline and maybe try to create a corresponding build.sh for *nix?

fsharpi build.fsx won't work as build.fsx depends on FAKE

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