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

When not in a git repository look for .mx_vcs_root file #221

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Jun 30, 2020

When primary suite is not in a git repository look for the top most
directory containing a .mx_vcs_root file and use that directory as the
sources root.

Closes #217

@zakkak zakkak marked this pull request as ready for review July 1, 2020 21:22
@zakkak zakkak force-pushed the mx-without-git branch 2 times, most recently from ed4876e to b0398cc Compare July 1, 2020 21:37
@zakkak
Copy link
Contributor Author

zakkak commented Jul 1, 2020

@gilles-duboscq I have pushed a first attempt of fixing cases where mx assumes a suite is under a vcs repository.
Could you please review it?

@zakkak zakkak force-pushed the mx-without-git branch 2 times, most recently from 1eb2b0a to 8bafd80 Compare July 1, 2020 22:03
Copy link
Member

@gilles-duboscq gilles-duboscq left a comment

Choose a reason for hiding this comment

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

i think this is the right direction. i have added some minor comments

mx.py Outdated Show resolved Hide resolved
mx.py Outdated Show resolved Hide resolved
mx.py Show resolved Hide resolved
mx.py Show resolved Hide resolved
mx.py Show resolved Hide resolved
mx.py Show resolved Hide resolved
@zakkak zakkak force-pushed the mx-without-git branch 2 times, most recently from 3111e11 to 73d65ce Compare July 2, 2020 14:17
mx.py Outdated
@@ -1518,7 +1519,7 @@ class Suite(object):
"""
def __init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=False):
if primary is True and vc_dir is None:
abort("The primary suite must be in a vcs repository")
abort("The primary suite must be in a vcs repository or under a directory containing a file called '.mx_vcs_root'")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gilles-duboscq I also added this to reflect the .mx_vcs_root file support

@zakkak
Copy link
Contributor Author

zakkak commented Jul 2, 2020

master seems to not pass travis CI.

@gilles-duboscq
Copy link
Member

I think this looks good. I will take it for further testing.
It will not solve the issues from other suites such as sdk, substratevm, compiler, and graalpython but we have to start at the mx level.

One thing though: just like OpenJDK, I don't think we want to add a copyright line for each contributor outside of the case where the whole file comes from a contribution.

@zakkak
Copy link
Contributor Author

zakkak commented Jul 8, 2020

I think this looks good. I will take it for further testing.

Thanks @gilles-duboscq !

It will not solve the issues from other suites such as sdk, substratevm, compiler, and graalpython but we have to start at the mx level.

Correct, I volunteer to work on them as well after this gets merged.

One thing though: just like OpenJDK, I don't think we want to add a copyright line for each contributor outside of the case where the whole file comes from a contribution.

Noted. I removed the copyright changes.

@gilles-duboscq
Copy link
Member

Thank you.
This looks good and passed internal testing, I will schedule it for integration.

# at the root of a repo that contains multiple suites.
hocon = join(suite_parent, 'ci.hocon')
if exists(hocon):
mx_vcs_root = join(suite_parent, '.mx_vcs_root')
Copy link
Member

Choose a reason for hiding this comment

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

during internal review, it came up that we should rather check for both files (ci.hocon or .mx_vcs_root) to avoid any breaking change to thing that might have relied on the existing ci.hocon heuristic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @gilles-duboscq !
This should now be resolved.

When primary suite is not in a git repository look for the top most
directory containing a .mx_vcs_root file and use that directory as the
sources root.

Closes graalvm#217
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mx requires primary suite to be in a VCS repository
3 participants