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

Fix some issues building on Windows #63

Closed
wants to merge 1 commit into from
Closed

Conversation

sormuras
Copy link
Member

@sormuras sormuras commented Aug 22, 2019

Building skara on Windows requires at least following changes:

  • build.gradle: enforce UTF-8 as source code encoding
  • BotRunnerConfigurationTests.java: make assertion file separator agnostic
  • ProcessTests.java: disable test class on Windows, all tests call tools that are not present by default on Windows

After applying those changes, there're two more issues with building on Windows:

  • VersionPlugin.java: there's an IOException raised, which I handled by setting the version property to "unknown", around line 55:
        } catch (IOException e) {
            // throw new GradleException("could not read output from 'git rev-parse'", e);
            project.setProperty("version", "unknown");
        }
  • All tests that use VCS.HG, e.g. JCheckTests#checksForCommit(VCS.HG), fail with:
    java.io.UncheckedIOException: java.io.IOException: Num headers (1) differ from num hunks (0) which might(!) be related to a) how git.exe/hg.exe are invoked and/or b) due to UnixStreamReader only interpreting \n as a new line character ... or c) something completely different.

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Approvers

  • Erik Helin (ehelin - Reviewer)

- build.gradle: enforce UTF-8 as source code encoding
- BotRunnerConfigurationTests.java: make assertion file separator agnostic
- ProcessTests.java: disable test class on Windows, all tests call tools
  that are not present by default on Windows
@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 22, 2019

Hi sormuras, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user sormuras as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk openjdk bot removed the rfr label Aug 22, 2019
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 22, 2019

Webrevs

@bridgekeeper bridgekeeper bot removed the oca label Aug 22, 2019
@openjdk openjdk bot added the rfr label Aug 22, 2019
@edvbld
Copy link
Member

@edvbld edvbld commented Aug 22, 2019

Thanks @sormuras for contributing! I know @JornVernee has been doing some work on getting the tests to pass on Windows as well, thank you for helping out in this area (me and @rwestberg use Linux and macOS).

edvbld
edvbld approved these changes Aug 22, 2019
Copy link
Member

@edvbld edvbld left a comment

Patch looks good!

@openjdk openjdk bot removed the rfr label Aug 22, 2019
@openjdk
Copy link

@openjdk openjdk bot commented Aug 22, 2019

@sormuras This change can now be integrated. The commit message will be:

Fix some issues building on Windows

Reviewed-by: ehelin
  • If you would like to add a summary, use the /summary command.
  • To list additional contributors, use the /contributor command.

Since the source branch of this PR was last updated there have been 4 commits pushed to the master branch:

  • 1b97234: Convert path separators in patch file to unix explicitly
  • 0f1e47d: Parse list of repositories to mirror as a list
  • ac33f2f: Add support for ready markers to the PR bot as well
  • 8467aae: 61: Remove sponsor label if PR is updated after flagged for integration

Since there are no conflicts, your changes will automatically be rebased on top of the above commits when integrating. If you prefer to do this manually, please merge master into your branch first.

As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@edvbld) but any other Committer may sponsor as well.

  • To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Aug 22, 2019
@JornVernee
Copy link
Member

@JornVernee JornVernee commented Aug 22, 2019

@sormuras I'm guessing you're also on HG version 5? I'm seeing the same failure on your last point, due to HG changing the internal API, and one of the extensions no longer working.

@openjdk openjdk bot removed the ready label Aug 22, 2019
@sormuras
Copy link
Member Author

@sormuras sormuras commented Aug 22, 2019

That's correct:

C:\Users\Sor>hg --version
Mercurial Distributed SCM (version 5.0.2)

I may downgrade to ... 4.7.x, if that helps.

@edvbld
Copy link
Member

@edvbld edvbld commented Aug 22, 2019

@sormuras I think Jorn already has a patch to get it working with 5.0.2, just hold on a little longer, no need to downgrade

@edvbld
Copy link
Member

@edvbld edvbld commented Aug 22, 2019

I also took the patch for a spin on my Linux x86_64 machine, all tests pass with sh gradlew test 👍

@sormuras
Copy link
Member Author

@sormuras sormuras commented Aug 22, 2019

off-topic Locally, I managed to upgrade Skara to JUnit 5.5.1 -- PR is in the making.
Will fix https://bugs.openjdk.java.net/projects/SKARA/issues/SKARA-69

@edvbld
Copy link
Member

@edvbld edvbld commented Aug 22, 2019

@sormuras as the openjdk[bot] described above, you need to type the /integrate command in a comment for me to able to sponsor this PR 😉

@openjdk openjdk bot added the ready label Aug 22, 2019
@sormuras
Copy link
Member Author

@sormuras sormuras commented Aug 22, 2019

/integrate

@openjdk openjdk bot added the sponsor label Aug 22, 2019
@openjdk
Copy link

@openjdk openjdk bot commented Aug 22, 2019

@sormuras
Your change (at version 7ffabbb) is now ready to be sponsored by a Committer.

@openjdk openjdk bot removed the sponsor label Aug 22, 2019
@edvbld
Copy link
Member

@edvbld edvbld commented Aug 22, 2019

/sponsor

@openjdk openjdk bot closed this Aug 22, 2019
@openjdk openjdk bot added the integrated label Aug 22, 2019
@openjdk
Copy link

@openjdk openjdk bot commented Aug 22, 2019

@edvbld @sormuras The following commits have been pushed to master since your change was applied:

Your commit was automatically rebased without conflicts.
Pushed as commit b4b37e8.

@sormuras sormuras deleted the windows branch Aug 24, 2019
@sormuras
Copy link
Member Author

@sormuras sormuras commented Aug 24, 2019

@sormuras I think Jorn already has a patch to get it working with 5.0.2, just hold on a little longer, no need to downgrade

Updated my fork and gave it a spin. Tests are now all(? still in progress...) running on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants