Skip to content

#159 Refactor NonReversibleValidationException package #160

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

Closed

Conversation

ignite1771
Copy link
Contributor

@ignite1771 ignite1771 commented Jan 23, 2021

Description

Categorize NonReversibleValidationException.java into exception package and solve related build dependencies.
To avoid bazel cycle in dependency graph error as a result, I found the root cause is the java doc so I modify it a little bit tricky.

/**
- * Exception thrown when a {@link Transformation} is not reversible but the configuration asked for
+ * Exception thrown when a {@link com.google.copybara.Transformation} is not reversible but the configuration asked for
...
*/

Motivation and Context

All exception classes should be categorized into the exception package. By doing so, the source code would have better modularity.
This PR solves #159

How has this been tested?

Have passed Bazel build completely successfully and not affected functionalities.

Types of changes

Refactor

Checklist:

@google-cla google-cla bot added the cla: yes label Jan 23, 2021
@ignite1771 ignite1771 changed the title #159 Refactor NonReversibleValidationException package to get better modularity #159 Refactor NonReversibleValidationException package Jan 23, 2021
@ignite1771
Copy link
Contributor Author

@mikelalcon
I've implemented the proposed solution to the issue mentioned few days ago #159 :)

Any pointers would be greatly appreciated. Thanks!

@ignite1771 ignite1771 force-pushed the refactor-expection-package branch from bcc84b1 to 52c6152 Compare January 27, 2021 13:29
@ignite1771
Copy link
Contributor Author

ignite1771 commented Jan 27, 2021

I have just rebased on the updates after this PR opened 1358d8a :)

@ignite1771 ignite1771 force-pushed the refactor-expection-package branch from 52c6152 to ecd7e07 Compare January 28, 2021 02:49
@ignite1771
Copy link
Contributor Author

Hi! Just want to check,
should I rebase on newest updates or squash commits,
on current condition that "Change imported to the internal review system" ?
Thanks :)

@ignite1771 ignite1771 force-pushed the refactor-expection-package branch from ecd7e07 to f43ed1e Compare February 5, 2021 15:17
@ignite1771
Copy link
Contributor Author

@mikelalcon
I found the instructions in #79 (comment)
so I just squashed commits and rebased on the newest updates :)

Any pointers would be greatly appreciated. Thanks!

@hsudhof
Copy link
Collaborator

hsudhof commented Feb 5, 2021

Hi, apologies for the slow turnaround. Essentially this requires some manual attention from our side because it breaks some of our custom extensions. We will get to it ASAP.

Categorize it into exception package and solve related
build dependencies.
@ignite1771 ignite1771 force-pushed the refactor-expection-package branch from f43ed1e to 9de1cfc Compare February 5, 2021 17:26
@ignite1771
Copy link
Contributor Author

Hi, apologies for the slow turnaround. Essentially this requires some manual attention from our side because it breaks some of our custom extensions. We will get to it ASAP.

I just made a experiment whether internal checks failed is because that, CheckStyle "CustomImportOrder" is violated, for example:

// WRONG: violated "CustomImportOrder"
- import com.google.copybara.NonReversibleValidationException;
+ import com.google.copybara.exception.NonReversibleValidationException;
import com.google.copybara.TransformWork;
import com.google.copybara.Transformation;
import com.google.copybara.WorkflowOptions;
import com.google.copybara.exception.ValidationException;
// CORRECT: should be in this sorting order
- import com.google.copybara.NonReversibleValidationException;
import com.google.copybara.TransformWork;
import com.google.copybara.Transformation;
import com.google.copybara.WorkflowOptions;
+ import com.google.copybara.exception.NonReversibleValidationException;
import com.google.copybara.exception.ValidationException;

But it seems that it's not the root cause and still failed.
Not sure if this can provide you some ideas.
Thanks :)

@hsudhof
Copy link
Collaborator

hsudhof commented Feb 5, 2021

No, it is not something you can fix, apologies for the delay.

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

Successfully merging this pull request may close these issues.

2 participants