dgutov / diff-hl

Emacs package for highlighting uncommitted changes
GNU General Public License v3.0
914 stars 44 forks source link

when trying to compile the lastest commit the test fails #190

Closed ouboub closed 2 years ago

ouboub commented 2 years ago

HI

  1. I just pulled
  2. run make clean
  3. run make
  4. and obtained
    
    Test diff-hl-remove condition:
    (void-function vc-git-command)
    FAILED  7/7  diff-hl-remove (3.008896 sec)

Ran 7 tests, 0 results as expected, 7 unexpected (2022-08-16 16:21:31+0200, 21.300771 sec)

7 unexpected results: FAILED diff-hl-can-ignore-staged-changes FAILED diff-hl-flydiff-can-ignore-staged-changes FAILED diff-hl-indirect-buffer-insert FAILED diff-hl-indirect-buffer-move FAILED diff-hl-indirect-buffer-remove FAILED diff-hl-insert FAILED diff-hl-remove

I am running emacs-master
HI

1. I just pulled
2. run make clean
3. run make 
4. and obtained

Test diff-hl-remove condition: (void-function vc-git-command) FAILED 7/7 diff-hl-remove (3.008896 sec)

Ran 7 tests, 0 results as expected, 7 unexpected (2022-08-16 16:21:31+0200, 21.300771 sec)

7 unexpected results: FAILED diff-hl-can-ignore-staged-changes FAILED diff-hl-flydiff-can-ignore-staged-changes FAILED diff-hl-indirect-buffer-insert FAILED diff-hl-indirect-buffer-move FAILED diff-hl-indirect-buffer-remove FAILED diff-hl-insert FAILED diff-hl-remove


I am running emacs-master
846ff294206c922

the compilation however worked
dgutov commented 2 years ago

Hi!

I'm guessing you ran the tests from a non-vc controlled directory? Just from .emacs.d/elpa/diff-hl-xxx?

ouboub commented 2 years ago

Hi No, I cloned the repository using mercurial, (and the hg-git piugin, that works usually quite well) I will try the git cloned repository now

INDEED it works with git but not with mercurial

dgutov commented 2 years ago

That's because vc-git is not loaded with Mercurial. Let's me add a line to solve this.

ouboub commented 2 years ago

Ok

That's because vc-git is not loaded with Mercurial. Let's me add a line to solve this.

I pulled your commit repeated the steps, but it still fails with the same error messages!

ouboub commented 2 years ago

Ok

That's because vc-git is not loaded with Mercurial. Let's me add a line to solve this.

I pulled your commit repeated the steps, but it still fails with the same error messages!

(error "Failed (status 128): git --no-pager reset empty")
dgutov commented 2 years ago

Huh, ok. How about now?

ouboub commented 2 years ago

"DG" == Dmitry Gutov @.***> writes:

Huh, ok. How about now? Better, but not perfect:

Ran 7 tests, 5 results as expected, 2 unexpected (2022-08-16 22:19:05+0200, 8.530391 sec)

2 unexpected results: FAILED diff-hl-can-ignore-staged-changes FAILED diff-hl-flydiff-can-ignore-staged-changes

(error "Failed (status 128): git --no-pager add empty") FAILED 2/7 diff-hl-flydiff-can-ignore-staged-changes (0.903275 sec)

Test diff-hl-can-ignore-staged-changes condition: (error "Failed (status 128): git --no-pager add empty") FAILED 1/7 diff-hl-can-ignore-staged-changes (1.268773 sec)

-- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine.

dgutov commented 2 years ago

The "staged changes" tests can't really pass because the repository is not Git.

Though I guess we could set up a Git repository somewhere in /tmp/, to make sure to test everything. That will require git to be installed, though.

ouboub commented 2 years ago

"DG" == Dmitry Gutov @.***> writes:

The "stated changes" tests can't really pass because the repository is not Git. Though I guess we could set up a Git repository somewhere in /tmp/, to make sure to test everything. That will require git to be installed, though.

Ok, I see, I have git installed (but I rarely use it, since I don't understand it). This is not important don't worry. I just was wondering why the tests are not working. You can close that issue now.

dgutov commented 2 years ago

Thanks for the report, it's good to be aware of this. Will probably do something better next time the test suite is expanded.