easyp-tech / easyp

Apache License 2.0
77 stars 3 forks source link

Way to update easyp.lock #54

Closed d-enk closed 5 months ago

d-enk commented 5 months ago
#easyp.yaml
deps:
  - github.com/gogo/protobuf@v1.3.1
$ easyp mod download 
# INFO Install package package=github.com/gogo/protobuf version=v1.3.1 commit=5628607bb4c51c3157aacc3a50f0ab707582b805
#easyp.yaml
deps:
  - github.com/gogo/protobuf@v1.3.2
$ easyp mod download 
# INFO Install package package=github.com/gogo/protobuf version=v1.3.1 commit=5628607bb4c51c3157aacc3a50f0ab707582b805

Something needs to change this behavior. Additional flag maybe, like yarn --immutable

hound672 commented 5 months ago

Hello. For now easyp reads version from lock file and ignore version from easyp.yaml. @ZergsLaw what do you think?

My suggestion:

  1. Read version from easyp.yaml -> if it's absent install version from lock file 1.2. if version is absent in lock file -> install the latest

  2. If version in easyp.yaml is higher than in lock file -> install new version and update lock file

ZergsLaw commented 5 months ago

Mb we can just add new command? For example

easyp mod update

And this commang can use versions from easyp.yml?

d-enk commented 5 months ago

Mb we can just add new command? For example


easyp mod update
I think so

And error for download when version differently

hound672 commented 5 months ago

So, by default for easyp mod download use versions from lock file and ignore versions from easyp.yaml For easyp mod update read versions from easyp.yaml and update lock file right?

ZergsLaw commented 5 months ago

My opinion - yes

d-enk commented 5 months ago

go mod download with a new version in go.mod just updates go.sum

But it have separated command to verify

UPD: You just need to see how it works in other managers