-
Notifications
You must be signed in to change notification settings - Fork 802
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
TINKERPOP-1836 Add Gremlin.Net.Template project #867
Conversation
Cool. A few comments/questions:
|
Maybe we could wait until |
Rebased and I extended the dotnet new gremlin -o MyFirstGremlinProject
// LAST LINE
Unfortunately not, it simply doesn't work with the dotnet CLI tool. So there really isn't anything the plugin can do to help us here. Here is what the dotnet docs say about that:
I never used (or heard about) this NuGetizer and it looks a bit outdated. So I'm sceptical whether that could help us.
Unfortunately, I don't think that the dotnet CLI tool will support that any time soon. The ticket in question should be NuGet/Home#4254. It has 20x 👍, was created over a year ago, but it doesn't look as if they wanted to address this issue in the near future. Nevertheless I share your concern that we shouldn't make the build too complicated, especially for new contributors who just want to submit a PR. Shouldn't it be possible to build the .NET projects from Maven and execute their tests without having to execute the
When we decide that we don't want to add this template right now, then I could also host it from my own GitHub until |
@FlorianHockmann i don't know if any of the following makes any sense, but would it be crazy to only package templates on deploy (since mono is already required there)? or do we need to continually build it because it could break or fail tests (i.e. maven archetypes are built and also tested for problems on every build)? Or, would it be crazy to only package templates if mono is present? Or perhaps it is somehow otherwise an optional aspect of the build (except on deploy)? |
I think that would be the best solution here. It wouldn't introduce any new dependencies to the build and it would still allow packaging of the template locally to test it just like the version that gets deployed (for contributors who have Mono installed but that's a necessity with every solution). |
Turns out that it was very easy to add a check if mono is present and otherwise skip the package of the template: <if>
<available file="mono" filepath="${env.PATH}"/> I rebased and squashed the commits as I had to revert changes I made to the dev docs because mono now isn't required any more to build the |
Your approach with
I suppose you could hit maven failures for "no internet" if you don't have all your .m2 stuff cached, but at least its possible to get a build without it. Going to think about this some more....maybe not a big deal i suppose. |
You're right. It shouldn't be necessary to have an internet connection when all dependencies are already available. I thought that nuget.exe would only be downloaded once as we have the |
I guess that will work....I wonder if this should be a bit more bulletproof though? on maybe make the |
Good point, I haven't considered that. I amended my last commit to include the solution you proposed. The downloaded exe now simply contains the version number (like |
gremlin-dotnet/src/pom.xml
Outdated
<executions> | ||
<execution> | ||
<id>pack-dotnet-template</id> | ||
<phase>package</phase> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to move the execution to the deploy
phase? that way on install
or prior phases, the build wouldn't be affected.
Also, it won't require mono on TravisCI or docker-based builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to propose that we generate and build That way we don't affect developers / collaborators that want to use |
I tend to agree with @jorgebay unless there is some high risk of something breaking in the template packaging (as i understand it we need nuget so that we can do If @FlorianHockmann can explain why there is sufficient risk for failure during |
I understand that part and I don't have anything against it, especially when we add something to the "Pre-flight Check" step as @spmallette suggests. But @jorgebay, what's your reasoning behind
? Shouldn't the template be built and tested in the same phases as Gremlin.Net itself? |
Yes, I probably didn't make it clear :) I wanted to say any maven phase for generating and building. |
I just rebased and made the changes so that now the template is only packed with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I've included a comment above, but in any case: VOTE +1
.travis.yml
Outdated
- sudo apt-get install apt-transport-https | ||
- sudo apt-get update | ||
- sudo apt-get install dotnet-sdk-2.1 | ||
- sudo apt install mono-devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove mono sdk from travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
VOTE +1 - thanks again @FlorianHockmann for dealing with another PR that the required a lot of back/forth review |
This project is a dotnet template that can be installed and then used to create a simple dotnet console application ready to be used together with a Gremlin Server.
Rebased again to fix a merge conflict. |
https://issues.apache.org/jira/browse/TINKERPOP-1836
This adds a dotnet template that can be installed and then used to create a simple dotnet console application ready to be used together with a Gremlin Server.
We need to release the template just like Gremlin.Net itself as a NuGet package to nuget.org.
IMPORTANT: The Maven
package
now requires Mono when .NET should be built as it's not possible to pack dotnet templates without Nuget (dotnet pack
doesn't work for this unfortunately)../docker/build.sh -t -i
ran successfully until it failed due to some Giraph tests and the .NET projects were already built successfully. Since the Giraph tests are known to be flaky and we already deprecated Giraph, I didn't look further into that.VOTE +1