killercup / cargo-edit

A utility for managing cargo dependencies from the command line.
http://killercup.github.io/cargo-edit/
MIT License
3.09k stars 148 forks source link

Upgrade tests now failing #764

Closed cassaundra closed 2 years ago

cassaundra commented 2 years ago

Tests exclude_dep and upgrade_verbose now fail with the recent release of serde 1.0.143:

failures:

---- upgrade_verbose::case stdout ----
thread 'upgrade_verbose::case' panicked at '
---- expected: tests/cargo-upgrade/upgrade_verbose/stderr.log
++++ actual:   stderr
   1    1 |     Updating '[ROOTURL]/registry' index
   2    2 |     Checking None's dependencies
   3    3 | name       old req locked  latest    new req  
   4    4 | ====       ======= ======  ======    =======  
   5    5 | docopt     0.4     0.4.1   99999.0.0 99999.0  
   6    6 | pad        0.1     0.1.1   99999.0.0 99999.0  
   7    7 | serde_json 20.0    20.0.0  99999.0.0 99999.0  
   8    8 | syn        0.1.1   0.1.1   99999.0.0 99999.0.0
   9    9 | tar        0.4     0.4.1   99999.0.0 99999.0  
  10   10 | ftp        20.0.0  20.0.0  99999.0.0 99999.0.0
  11   11 | te         0.1.1   0.1.1   99999.0.0 99999.0.0
  12   12 | semver     0.2     0.2.3   99999.0.0 99999.0  
  13   13 | rn         0.1     0.1.1   99999.0.0 99999.0  
  14   14 | assert_cli 0.2.0   0.2.3   99999.0.0 99999.0.0
  15   15 | tempdir    0.1     0.1.1   99999.0.0 99999.0  
  16      - serde      1.0     1.0.142 -         1.0      
       16 + serde      1.0     1.0.143 -         1.0      
  17   17 | openssl    0.4     0.4.1   99999.0.0 99999.0  
  18   18 | rget       0.4.0   0.4.1   99999.0.0 99999.0.0
  19   19 | geo        0.2.0   0.2.3   99999.0.0 99999.0.0
  20   20 | ftp        0.2.0   0.2.3   99999.0.0 99999.0.0

Update with SNAPSHOTS=overwrite
', tests/cargo-upgrade/upgrade_verbose/mod.rs:22:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- exclude_dep::case stdout ----
thread 'exclude_dep::case' panicked at '
---- expected: tests/cargo-upgrade/exclude_dep/stderr.log
++++ actual:   stderr
   1    1 |     Updating '[ROOTURL]/registry' index
   2    2 |     Checking None's dependencies
   3    3 | warning: ignoring docopt, excluded by user
   4    4 | name       old req locked  latest    new req  
   5    5 | ====       ======= ======  ======    =======  
   6    6 | pad        0.1     0.1.1   99999.0.0 99999.0  
   7    7 | serde_json 20.0    20.0.0  99999.0.0 99999.0  
   8    8 | syn        0.1.1   0.1.1   99999.0.0 99999.0.0
   9    9 | tar        0.4     0.4.1   99999.0.0 99999.0  
  10   10 | ftp        20.0.0  20.0.0  99999.0.0 99999.0.0
  11   11 | te         0.1.1   0.1.1   99999.0.0 99999.0.0
  12   12 | semver     0.2     0.2.3   99999.0.0 99999.0  
  13   13 | rn         0.1     0.1.1   99999.0.0 99999.0  
  14   14 | assert_cli 0.2.0   0.2.3   99999.0.0 99999.0.0
  15   15 | tempdir    0.1     0.1.1   99999.0.0 99999.0  
  16      - serde      1.0     1.0.142 -         1.0      
       16 + serde      1.0     1.0.143 -         1.0      
  17   17 | openssl    0.4     0.4.1   99999.0.0 99999.0  
  18   18 | rget       0.4.0   0.4.1   99999.0.0 99999.0.0
  19   19 | geo        0.2.0   0.2.3   99999.0.0 99999.0.0
  20   20 | ftp        0.2.0   0.2.3   99999.0.0 99999.0.0

Update with SNAPSHOTS=overwrite
', tests/cargo-upgrade/exclude_dep/mod.rs:22:10

failures:
    exclude_dep::case
    upgrade_verbose::case

It seems the registry mocking is not working properly for all dependencies. I'll start looking into this soon.

cassaundra commented 2 years ago

Pretty sure this is just because serde in these two projects points to a git repository which we don't have control over. I'm thinking it might be better to add a dummy serde and point to it with path instead?