You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2020/01/17 17:02:15 UTC

recovering from strange build issue

While working on UIMA-6128, I at one point switched my local repo to master,
made a new branch from this, and merged into that the v2 master, to pick up the
6128 change.

To my surprise, when I tried running a test build on uimaj-core (which had the
changes), the test failed, running 2 test classes that were in the v2 version,
but not in the v3 version.

I went looking (via grep for file names or file contents of the particular test)
in the checked out working directory, but found nothing.  This wasn't an Eclipse
issue - I got the same failure running with eclipse or from the command line
with Eclipse stopped.

The "fix" was to first insure my working directory had no uncommitted changes
(git status was "clean"), then I deleted the local clone, and recloned from
github. 

Then running the tests worked fine.

I have no idea where the test runner was finding those v2-version files, when my
grep and file explore manual looking couldn't find them.

I guess a moral of this story is to not do git switch between uima v2 and v3,
but instead do something that erases the local working directory, and then does
a checkout again.

Or perhaps using git clean or git stash --all  would have worked (didn't try). 
See https://git-scm.com/book/en/v2/Git-Tools-Stashing-and-Cleaning

-Marshall


Re: recovering from strange build issue

Posted by Marshall Schor <ms...@schor.com>.
in my case, I was running mvn clean install on uimaj-core (by itself); the test
phase was somehow finding some v2 tests even though I had v3 checked out, and my
windows file explorer (and eclipse) both showed no such test files were in the
working dir. 

I probably made some foolish kind of error (e.g., looked in the wrong spot or
something...)...

-M

On 1/17/2020 1:12 PM, Richard Eckart de Castilho wrote:
> On 17. Jan 2020, at 18:02, Marshall Schor <ms...@schor.com> wrote:
>> I guess a moral of this story is to not do git switch between uima v2 and v3,
>> but instead do something that erases the local working directory, and then does
>> a checkout again.
> When I do a switch between v2 and v3, I always run a "mvn clean" on the command line
> and then do an "Update Maven projects" in Eclipse. So far, that works for me.
>
> -- Richard

Re: recovering from strange build issue

Posted by Richard Eckart de Castilho <re...@apache.org>.
On 17. Jan 2020, at 18:02, Marshall Schor <ms...@schor.com> wrote:
> 
> I guess a moral of this story is to not do git switch between uima v2 and v3,
> but instead do something that erases the local working directory, and then does
> a checkout again.

When I do a switch between v2 and v3, I always run a "mvn clean" on the command line
and then do an "Update Maven projects" in Eclipse. So far, that works for me.

-- Richard