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

Git dependencies #344

Merged
merged 15 commits into from
Sep 2, 2016
Merged

Git dependencies #344

merged 15 commits into from
Sep 2, 2016

Conversation

st3veV
Copy link
Contributor

@st3veV st3veV commented Aug 31, 2016

Git dependencies behavior as discussed in #238 :

  • it's now possible to call haxelib install haxelib.json and dependencies from the json will be installed
  • dependencies can have version in form: git:<url>#commit-ish... if so git dependency will be installed, this is possible in both json and hxml definitions
  • if commit-ish is defined and/or different than one already installed from same json/hxml (ie. because of dependency of dependency) user is prompted to confirm overwriting existing git version

@andyli
Copy link
Member

andyli commented Sep 1, 2016

Thanks. Would you take a look at the failed test and try to fix it?

Command: haxe [client_tests.hxml]
Class: tests.TestSemVer ...
Class: tests.TestData .E.......
Class: tests.TestRemoveSymlinks .
Class: tests.TestRemoveSymlinksBroken .
Class: tests.TestHg ...........
Class: tests.TestGit ...........
Class: tests.TestVcsNotFound ....
Class: tests.TestInstall ..
* tests.TestData::testReadDataWithoutCheck()
ERR: exception thrown : Invalid field access : length
Called from StringTools::startsWith line 142
Called from haxelib._Data.Dependencies_Impl_::toArray line 83
Called from haxelib.Data::readData line 339
Called from tests.TestData::testReadDataWithoutCheck line 237
Called from a C function
Called from haxe.unit.TestRunner::runCase line 115
FAILED 42 tests, 1 failed, 41 success
Command exited with 1 in 55s: haxe [client_tests.hxml]

@st3veV
Copy link
Contributor Author

st3veV commented Sep 1, 2016

Fixed.

@ibilon
Copy link
Member

ibilon commented Sep 1, 2016

Hey, thanks for the contribution.

Could you add a check that vcs dependencies aren't allow when submitting to haxelib?

if commit-ish is defined and/or different than one already installed from same json/hxml (ie. because of dependency of dependency) user is prompted to confirm overwriting existing git version

Not sure I fully get what that means, you can't have two branch of the same repository used as deps by different libs/project?

@st3veV
Copy link
Contributor Author

st3veV commented Sep 1, 2016

Yep, the check makes sense. I'll look at it.

Not sure I fully get what that means, you can't have two branch of the same repository used as deps by different libs/project?

Correct. In the discussion for #238 it was decided to not bother with this and support just one because it already brings quite a lot of value (#238 (comment) and #238 (comment)).

@st3veV
Copy link
Contributor Author

st3veV commented Sep 1, 2016

So I did some digging through the code and testing and there already is a "check"... submit fails with ie.: Error: git:https://github.com/fzzr-/hx.signal.git is not a valid version string because the JSON is being validated. In my opinion the error descriptive enough and submit is failing so it behaves as expected but I'm open to different opinions.

@ibilon
Copy link
Member

ibilon commented Sep 2, 2016

The error message could be improved but it's still descriptive enough.

@nadako I haven't tried it yet but the design and code are good, what do you think?

@nadako
Copy link
Member

nadako commented Sep 2, 2016

lgtm, ship it!

@nadako nadako merged commit 7901cd3 into HaxeFoundation:development Sep 2, 2016
@st3veV st3veV deleted the git-dependencies branch September 5, 2016 12:21
@tobil4sk tobil4sk mentioned this pull request Apr 11, 2022
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