Skip to content

Move NUnit dependency and invoke nuget always in cmd script - #68

Merged
pblasucci merged 1 commit into
fsprojects:masterfrom
tpetricek:master
Aug 6, 2014
Merged

pblasucci merged 1 commit into
fsprojects:masterfrom
tpetricek:master

Conversation

@tpetricek

Copy link
Copy Markdown
Member

I noticed that the build.sh file has a hard-coded version of FAKE. This does not sound right to me.. or is there any reason for that?

Also, build.cmd always triggers nuget install, which will automatically update FAKE if you have an old version. It sounds sensible to do this on *nix too.

@caindy - Could you please check that this works well on a Mac? (Or in case I'm missing something, let me know what the problem with latest FAKE was...)

@caindy

caindy commented Jul 22, 2014

Copy link
Copy Markdown
Contributor

Hi Tomas, Steffen fixed an issue with the --fsiargs option in FAKE 3.2.1. I originally tried to specify a minimum bound on the version, but that doesn't work with nuget.exe unfortunately. Anyway, it's not necessary given that the current version of FAKE on nuget is greater.

The reason for skipping the install was just to save time on the build. I'm thinking specifically about CI here; I wouldn't want FAKE changing there. I'll defer to your better judgement on this case.

I'll confirm that this works on my machine, and it looks like it is working in Travis.

@caindy

caindy commented Jul 22, 2014

Copy link
Copy Markdown
Contributor

Hi Tomas, this seems unrelated but here's an error output. The build actually succeeded in spite of the error.

Generating 'index.html'
System.Exception: Generating HTML failed.
  at FSharp.Literate.RazorRender.ProcessFile[IDictionary`2] (System.String source, Microsoft.FSharp.Core.FSharpOption`1 properties) [0x00000] in <filename unknown>:0
  at FSharp.Literate.Templating.generateFile (System.String contentTag, IEnumerable`1 parameters, Microsoft.FSharp.Core.FSharpOption`1 templateOpt, System.String output, IEnumerable`1 layoutRoots) [0x00000] in <filename unknown>:0
  at FSharp.Literate.Templating.processFile (FSharp.Literate.LiterateDocument doc, System.String output, FSharp.Literate.ProcessingContext ctx) [0x00000] in <filename unknown>:0
  at FSharp.Literate.Literate.ProcessScriptFile (System.String input, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 output, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots) [0x00000] in <filename unknown>:0
  at <StartupCode$FSharp-Literate>[email protected] (System.String file, System.String output) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Core.FSharpFunc`2[System.String,System.String].InvokeFast[Unit] (Microsoft.FSharp.Core.FSharpFunc`2 func, System.String arg1, System.String arg2) [0x00000] in <filename unknown>:0
  at <StartupCode$FSharp-Literate>.$Main.processDirectory@165 (Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpFunc`2 processScriptFile, Microsoft.FSharp.Core.FSharpFunc`2 processMarkdown, System.String indir, System.String outdir) [0x00000] in <filename unknown>:0
  at FSharp.Literate.Literate.ProcessDirectory (System.String inputDirectory, Microsoft.FSharp.Core.FSharpOption`1 templateFile, Microsoft.FSharp.Core.FSharpOption`1 outputDirectory, Microsoft.FSharp.Core.FSharpOption`1 format, Microsoft.FSharp.Core.FSharpOption`1 formatAgent, Microsoft.FSharp.Core.FSharpOption`1 prefix, Microsoft.FSharp.Core.FSharpOption`1 compilerOptions, Microsoft.FSharp.Core.FSharpOption`1 lineNumbers, Microsoft.FSharp.Core.FSharpOption`1 references, Microsoft.FSharp.Core.FSharpOption`1 fsiEvaluator, Microsoft.FSharp.Core.FSharpOption`1 replacements, Microsoft.FSharp.Core.FSharpOption`1 includeSource, Microsoft.FSharp.Core.FSharpOption`1 layoutRoots) [0x00000] in <filename unknown>:0
  at FSI_0002.buildDocumentation () [0x00000] in <filename unknown>:0
  at <StartupCode$FSI_0002>.$FSI_0002.main@ () [0x00000] in <filename unknown>:0
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

Processing the file '/Users/ca/Code/FSharp.ProjectScaffold/docs/tools/../../packages/FSharp.Formatting.2.4.1/templates/docpage.cshtml' failed
Source written to: '/var/folders/k5/t0jg8bdd3513zvvdz75qb12r0000gn/T/tmp2cd0c0cc.tmp.cs'
Compilation errors:
Stopped due to error
Finished Target: GenerateDocs
Starting Target: All (==> GenerateDocs)
Finished Target: All

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target            Duration
------            --------
Clean             00:00:00.0092646
RestorePackages   00:00:03.9445041
AssemblyInfo      00:00:00.0125757
Build             00:00:08.2906464
RunTests          00:00:02.0455297
CleanDocs         00:00:00.0011381
GenerateDocs      00:00:10.3904497
All               00:00:00.0001590
Total:            00:00:24.7540831
Status:           Ok
---------------------------------------------------------------------

@caindy

caindy commented Jul 31, 2014

Copy link
Copy Markdown
Contributor

The error above is the same as in #65. I'm going to comment further there.

@tpetricek

Copy link
Copy Markdown
Member Author

As for the documentation failure, there is some Razor bug that I don't fully understand. I'll see what can be done (in the other discussion).

As for FAKE - I think nuget does only a reasonably quick check if you have the latest version. So, there is some overhead, but not too bad one.

As for the version updating - I actually think it is better when the version updates on your machine. Otherwise, you may end up using old version and others who clone the project & run build might not be able to build it, because they'll have different version of FAKE (the other option is to require fixed version, but that does not sound so good to me). I think @forki is the right person to tell us what the best practice is!

pblasucci added a commit that referenced this pull request Aug 6, 2014
Move NUnit dependency and invoke nuget always in cmd script
@pblasucci
pblasucci merged commit 8df9afe into fsprojects:master Aug 6, 2014
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

Successfully merging this pull request may close these issues.

3 participants