Skip to content

alr publish refuses to build if a crate with same name/version exists in the loaded index #1083

@stcarrez

Description

@stcarrez

I have a local index where I populate several project crates before publishing widely.

alr index
# NAME      URL                                                         PATH                                              
1 community git+https://github.com/alire-project/alire-index#stable-1.2 /home/ciceron/.config/alire/indexes/community/repo
2 local     file:///src/awa/alire-index-local                           /src/awa/alire-index-local

At some time in the publish process, it is necessary to re-publish to fix issues but when you do so, you'll get the error:

alr publish
✓ Local repository is clean.
error: Target release elada=1.8.4 already exist in a loaded index

and I have to remove the crate from my local repository to be able to run the command.

The -f (force) option does nothing.
May be Alire should:

  • honor the -f option and ignore that error,
  • don't report an error if the crate+version is found in a local repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    cost: 0-trivialMinimal changes required (<1h)type: enhancementImprovements to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions