Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feature/bazel#357

Merged
nikhedonia merged 15 commits into
masterfrom
feature/bazel
Oct 8, 2019
Merged

feature/bazel#357
nikhedonia merged 15 commits into
masterfrom
feature/bazel

Conversation

@njlr

@njlr njlr commented Oct 2, 2019

Copy link
Copy Markdown
Collaborator

Rudimentary Bazel support.

@njlr njlr requested a review from nikhedonia October 2, 2019 19:30
Comment thread buckaroo/DefaultSourceExplorer.fs Outdated
open Buckaroo.Logger

type DefaultSourceExplorer (console : ConsoleManager, downloadManager : DownloadManager, gitManager : GitManager) =
type DefaultSourceExplorer (console : ConsoleManager, downloadManager : DownloadManager, gitManager : GitManager, buildSystem : BuildSystem) =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why does the source explorer need to know about the buildsystem?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In Bazel mode we only require a WORKSPACE file to be present. See #358

@nikhedonia nikhedonia Oct 6, 2019

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a bit arbitrary and we had users in the past asking for this feature when using Buckaroo without a buildsystem. I'd prefer if we could enable this behaviour independent of the buildsystem.Maybe this should be part of the PackageLocation type?
Given how we fetch the manifest this would be quite easy to implement and would enable to handle npm, java etc in a unified fashion here:
https://github.com/LoopPerfect/buckaroo/blob/master/buckaroo/DefaultSourceExplorer.fs#L293

This would enable us to easily extend the way how we can handle deps with non-buckaroo manifests:

buckaroo add nomanifest+gh+google/tensorflow 
buckaroo add npm+gh+facebook/react
buckaroo add pom+gh+google/guava
buckaroo add pom+mvn+google/guava

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Wouldn't this require more effort on the part of the user to annotate all of the Bazel (but not Buckaroo) packages they want to use?

@nikhedonia nikhedonia Oct 6, 2019

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes but that is also a matter of choosing defaults.
If we handle Build Systems, packaging formats and constraintsas seperate concerns we can then
handle multi language / multi buildsystem projects more elegantly.

We can follow up with UX features that modify the default behaviour of buckaroo add via eg. Environment variables, .buckaroorc, existence of bazel files (buckaroo init --bazel?)

Bazel (but not Buckaroo) packages

In future, every library that can be installed by Buckaroo should be considered a Buckaroo package.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Are you saying the behaviour of this PR is incorrect (from a user's perspective) or that the implementation is not (elegantly) extensible?

@nikhedonia nikhedonia Oct 6, 2019

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Both:
the behaviour of how to retrieve (or what should happen if you can't) a manifest of a specific PackageLocation is a property of that specific package and not a (global) property of the project.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I see. Can you write up a quick Hack MD?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

BuildSystem param now removed

@nikhedonia nikhedonia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Everything else looks good great

@nikhedonia nikhedonia merged commit 49b5425 into master Oct 8, 2019
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.

2 participants