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

Add tsfmt support for maven #552

Closed
wants to merge 15 commits into from
Closed

Add tsfmt support for maven #552

wants to merge 15 commits into from

Conversation

nedtwigg
Copy link
Member

Here you can see how I refactored your tests to use the same files as the other tests. Both tsconfigFile and tsconfigInline are failing. tsconfigFile fails with the same "No inputs were found...", and tsconfigInline is failing because it just isn't formatting at all. The others are passing.

This indicates to me that there's something deeper that's wrong, and I have a suspicion which I'll elaborate on below.

private Map<String, Object> config;

@Parameter(defaultValue = "${project.build.directory}", required = true, readonly = true)
private File buildDir;
Copy link
Member Author

Choose a reason for hiding this comment

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

This default seems to not be effective...


if (buildDir == null) {
buildDir = new File(".");
}
Copy link
Member Author

Choose a reason for hiding this comment

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

... because if it was, this wouldn't be necessary. I think part of what might be happening is that new File(".") is not resolving to where we suspect it to be. We could modify FormatterStepConfig to include this value. It already has a FileLocator, but unfortunately that can only be used to get files. Should be able to add the base directory to this, I imagine....

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm... I tried this below and it is still not working.

@nedtwigg
Copy link
Member Author

The quick fix is to remove tsconfig support from the maven side. I'd like to get to the bottom of this - the fact that it's passing in one place but failing in another is good info, something must not be doing what we expect. I'm outta time on this for now. Sorry for screwing up the PR, feel free to open a new one, or if you just push and comment then I can push it into this PR manually.

@nedtwigg
Copy link
Member Author

I have to do @source-knights, because apparently I can only ask for a review from a committer.

@source-knights
Copy link
Contributor

source-knights commented Mar 29, 2020

Hey, no worries @nedtwigg . But not sure what you mean with push and comment? You mean in my original PR?

Also I think that the error shown during the tsconfig test is misleading. From all I tested it actually find the files (cause the error with non existing files is different). If you look closely there is another error mentioned in the logs, and that might be the real error, just leading to the other error message. I mentioned that in my PR comments. Its about "-color" flag when calling the tsfmt.

@source-knights
Copy link
Contributor

@nedtwigg PR #553 created. Hope that's what you meant ;)

@nedtwigg
Copy link
Member Author

Perfect! Thanks.

@nedtwigg nedtwigg closed this Mar 29, 2020
@nedtwigg nedtwigg deleted the feat/tsfmt-maven branch May 5, 2020 00:25
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.

None yet

2 participants