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

Move manifest generation in a specific method #1540

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

Riduidel
Copy link
Contributor

The manifest generation method is to be invoked after file copy.

The goal of this method is to make sure the entries we write in manfiest do not exist already or, if they exist, are compatible with quarkus requirements.
This goal is reached for MAIN_CLASS attribute, but not totally for CLASSPATH

@@ -346,6 +340,54 @@ public void accept(Path path) {
}
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if the below comments are necessary..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do prefer to leave that comment since it explain why this method exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do prefer to leave that comment since it explain why this method exist

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

@Riduidel thanks for taking this one.

I added a few comments. Could you take a look? Once you're done, please squash everything in one commit.

Thanks!

* @see https://github.com/quarkusio/quarkus/issues/1443
* @param runnerZipFs
* @param classPath
* @throws IOException
Copy link
Member

Choose a reason for hiding this comment

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

You can remove all the @ entries, they are useless.

If you squash everything and has the issue id in the commit comment (I usually add "Fixes #xxxx" as a second line), it will serve this purpose with the Git history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will try the squash (but am not enough git-ready to make sure I will succeed)

if (attributes.containsKey(Attributes.Name.MAIN_CLASS)) {
String existingMainClass = attributes.getValue(Attributes.Name.MAIN_CLASS);
if (!mainClass.equals(existingMainClass)) {
log.errorf("Your MANIFEST.MF defines as %s %s, while Quarkus is configured to use %s. "
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "Your MANIFEST.MF already defined a MAIN_CLASS entry. Quarkus has overwritten your existing entry." would be better.

You can have the name of the entries as a variable but in this case, please be consistent across the 2 error message.

@gsmet
Copy link
Member

gsmet commented Mar 19, 2019

@Riduidel will you have time to address my comments or should I apply them?

We are releasing a new release tomorrow and it would be nice to have this one in. Thanks!

@Riduidel
Copy link
Contributor Author

Riduidel commented Mar 19, 2019 via email

@Riduidel
Copy link
Contributor Author

And indeed, I don't know how to squash those commits that are already pushed to GitHub ...

…od, invoked after copying all files

The goal of this method is to make sure the entries we write in manfiest do not exist already or, if they exist, are compatible with quarkus requirements.
This goal is reached for MAIN_CLASS attribute, but not totally for CLASSPATH
@gsmet gsmet force-pushed the bugfix-1443-overwritten-manifest branch from 0ec82e4 to 983d992 Compare March 19, 2019 21:03
@gsmet
Copy link
Member

gsmet commented Mar 19, 2019

@Riduidel I rebased, squashed and pushed to your branch.

Let's wait for CI to go green again.

As for rebasing, what I usually do is:

  • git rebase -i commit_before_all_the_commits
  • then use f as fixup to merge your commits (instead of pick) or s for squash if you want to keep the commit messages and merge them
  • then quit your editor: git will apply the changes
  • then force push to your branch

@gsmet gsmet merged commit dd2dc9e into quarkusio:master Mar 19, 2019
@gsmet
Copy link
Member

gsmet commented Mar 19, 2019

Merged, thanks!

@gsmet gsmet added this to the 0.12.0 milestone Mar 19, 2019
@cescoffier cescoffier changed the title Fixes #1443 by moving manifest generation in a specific method Move manifest generation in a specific method Mar 20, 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.

3 participants