Skip to content

[Suggestion] Support for multiple projects with deliverable output - #116

Merged
forki merged 26 commits into
fsprojects:masterfrom
Vidarls:multiproject
Mar 5, 2015
Merged

forki merged 26 commits into
fsprojects:masterfrom
Vidarls:multiproject

Conversation

@Vidarls

@Vidarls Vidarls commented Oct 30, 2014

Copy link
Copy Markdown
Contributor

Following up #101

Managed to clean up and simplify quite a bit.

Vidar L. Sømme added 8 commits October 16, 2014 15:21
Allows for multiple projects in the src folder, each can be released as a nuget package
Nuget packaging now automatically infers dependencies based on paket settings.
* For dependencies between projects in the same solution, a nuget dependency to the generated package for the projects are added to the nuspec
* For projects with Exe output type, All files in the relevant bin folder are added to the nuget package, no dependencies. Cause dealing with dependencies in a deploy situation is not really fun.
Changed how libdirs are resolved for generating API docs with
the new bin folder hierarchy.
@forki

forki commented Oct 30, 2014

Copy link
Copy Markdown
Member

already looks much better.
Now we need to get rid of the last bits ;-)

@tpetricek

Copy link
Copy Markdown
Member

In a way, I quite like the simplicity of dropping everything in a single bin folder - though it has obvious drawbacks.

What do others think about this? /cc @forki @pblasucci @sergey-tihon ?

@sergey-tihon

Copy link
Copy Markdown
Member

I also like an approach with single bin folder.

The one drawback that I see is the case when you want to build >1 NuGet package from the repo. In this case you probably want to build binaries to each package to different directories.

@pblasucci

Copy link
Copy Markdown
Collaborator

Personally, I'm a fan of the single bin directory. But I can see the merits of different paths to support multiple NuGet packages.

Perhaps something that complicated is beyond the scope of Scaffold? After all, the original intent was to provide a quickly running, high-quality baseline. I always imagined some level of ad hoc tweaking would be done (esp. once you fall outside the typical use cases).

@Vidarls

Vidarls commented Jan 27, 2015

Copy link
Copy Markdown
Contributor Author

For my current setup I enjoy some advantages from separate bin folders (particularly CI server download single sub proj output as zip), but I really don't have strong feelings about this anyway.

The only practical issue here is to decide what files to put in what nuget package.
But I don't think it needs to be very difficult using either single bin, or bin/proj approach. Even with multiple packages being output. One can use the src/proj file structure to get the dll names.
(Only becomes a problem if you have some libary type packages where all dependencies are specified in the nuspec, and some deployment packages that are intended to be self contained.)

In my opinion having multiple packages is not really a strange pattern. NancyFx does it, simple.data does it, the new Xunit does it: Core package and addition packages for different feature sets.

The most important thing to me is to have a sensible default that can easily be tweaked. That way I can base my projects on scaffold, modify them, and later keep up to date by pulling in new changes.

@tpetricek

Copy link
Copy Markdown
Member

I'm happy to leave the decision to others here - though I'm a bit worried about the increasing complexity of ProjectScaffold... (Not that I would have any good solution to this.)

EDIT That said, I see why this would be useful in some scenarios. I'm just not sure what is the best default (and how to best provide alternatives to the default).

@Vidarls

Vidarls commented Feb 23, 2015

Copy link
Copy Markdown
Contributor Author

Now that Paket supports packing, I suppose quite a bit of the code here is redundant.
Is anyone working on integrating Paket packaging (as opposed to nuget packaging) in ProjectScaffold?

If not, I am entering a infrastructure maintenance period this week, and I have time to have a go.

@forki

forki commented Feb 23, 2015

Copy link
Copy Markdown
Member

I planned to do this, but I'd prefer if you could do it since we need more
people trying it out and find bugs/unclear behavior.
On Feb 23, 2015 1:50 PM, "Vidar Løvbrekke Sømme" [email protected]
wrote:

Now that Paket supports packing, I suppose quite a bit of the code here is
redundant.
Is anyone working on integrating Paket packaging (as opposed to nuget
packaging) in ProjectScaffold?

If not, I am entering a infrastructure maintenance period this week, and I
have time to have a go.

—
Reply to this email directly or view it on GitHub
#116 (comment)
.

Conflicts:
	build.template
	docs/tools/generate.template
	nuget/FSharp.ProjectTemplate.nuspec
@Vidarls

Vidarls commented Feb 23, 2015

Copy link
Copy Markdown
Contributor Author

Ok, then I will have a go.
(I'll probably start by trying to replace the existing single output packing, then move on to the multiproject version).

Vidar L. Sømme added 3 commits February 23, 2015 20:00
Conflicts:
	build.template
	nuget/FSharp.ProjectTemplate.nuspec
	paket.dependencies
@Vidarls

Vidarls commented Feb 26, 2015

Copy link
Copy Markdown
Contributor Author

You're right, its a case of windows guy running stuff on linux, forgetting cAsINg matters..

@Vidarls

Vidarls commented Feb 26, 2015

Copy link
Copy Markdown
Contributor Author

Is this again the API limit thing?

Paket version 0.31.1.0
found: /home/travis/build/fsprojects/ProjectScaffold/paket.dependencies
Paket failed with:
    Could not retrieve data from https://api.github.com/repos/fsharp/FAKE/commits/master

Message: The remote server returned an error: (403) Forbidden.

@forki

forki commented Feb 26, 2015

Copy link
Copy Markdown
Member

Yep. But seems it's only happening on TravisCI
On Feb 26, 2015 12:54 PM, "Vidar Løvbrekke Sømme" [email protected]
wrote:

Is this again the API limig thing?

Paket version 0.31.1.0
found: /home/travis/build/fsprojects/ProjectScaffold/paket.dependencies
Paket failed with:
Could not retrieve data from https://api.github.com/repos/fsharp/FAKE/commits/master

Message: The remote server returned an error: (403) Forbidden.

—
Reply to this email directly or view it on GitHub
#116 (comment)
.

@Vidarls

Vidarls commented Feb 26, 2015

Copy link
Copy Markdown
Contributor Author

Ok, can you go through and give some feedback on this PR when you have the time?

@Vidarls

Vidarls commented Mar 4, 2015

Copy link
Copy Markdown
Contributor Author

Any feedback on what is missing before this one can be merged?

Comment thread paket.dependencies Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, It's all in the Fake helper, so this one can go

@forki

forki commented Mar 4, 2015

Copy link
Copy Markdown
Member

can you please rebase and squash this?

Comment thread docs/tools/generate.template Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about making this a simple value. Like let binaries =

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

@Vidarls

Vidarls commented Mar 4, 2015

Copy link
Copy Markdown
Contributor Author

Regarding rebasing and squashing: Will rebase and squash break my own downstream projects (already based on the code in this PR) once this is merged and I pull changes from master

@forki

forki commented Mar 4, 2015

Copy link
Copy Markdown
Member

ok then forget the rebase ;-)

@Vidarls

Vidarls commented Mar 4, 2015

Copy link
Copy Markdown
Contributor Author

forgot a question mark there, it was genuinely meant as a question, as to what will happen to my downstream projects if I rebase? I don't know..

@forki

forki commented Mar 4, 2015

Copy link
Copy Markdown
Member

no. It's fine. please just correct the last two minor things. then I'll merge it.

@Vidarls

Vidarls commented Mar 5, 2015

Copy link
Copy Markdown
Contributor Author

Minor stuff fixed. Don't understand quite why the travis build fails.

@forki

forki commented Mar 5, 2015

Copy link
Copy Markdown
Member

Looks like the directory doesn't exist

@Vidarls

Vidarls commented Mar 5, 2015

Copy link
Copy Markdown
Contributor Author

tries to find this directory:

/home/travis/build/fsprojects/ProjectScaffold/src/home/bin/Release

Notise the home between src and bin

Comment thread build.template Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Path.Combine

@Vidarls

Vidarls commented Mar 5, 2015

Copy link
Copy Markdown
Contributor Author

weird.

It seems

directoryInfo "src" 
    |> subDirectories 

Is returning an extra sub directory:

Starting Target: CopyBinaries (==> Build)
Creating /home/travis/build/fsprojects/ProjectScaffold/bin/CONTINUOUSINTEGRATION
Creating /home/travis/build/fsprojects/ProjectScaffold/bin/home
Running build failed.

Error:
System.IO.DirectoryNotFoundException: Directory '/home/travis/build/fsprojects/ProjectScaffold/src/home/bin/Release' not found.

@forki

forki commented Mar 5, 2015

Copy link
Copy Markdown
Member

wow. sounds like an issue in FAKE. can you explicitly exlude it for now?

@Vidarls

Vidarls commented Mar 5, 2015

Copy link
Copy Markdown
Contributor Author

Finally 🎉

@forki

forki commented Mar 5, 2015

Copy link
Copy Markdown
Member

Good work. Thanks

forki added a commit that referenced this pull request Mar 5, 2015
[Suggestion] Support for multiple projects with deliverable output
@forki
forki merged commit b801219 into fsprojects:master Mar 5, 2015
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.

5 participants