I am currently developping a module A depending on module B. We need to update both A and B and test them together. I then added a replace directive for module B in the go.mod file of A. But how to deal with this file for continuous integration? Should we manually add and remove the replace directive? This can be error prone. Can’t we specify another go.mod file to the go build command for example, with a replace directive and one without? Or make the replace directive conditionnal?
Why is it necessary to change the replace directive? The docs say:
The replace directive allows you to supply another import path that might be another module located in VCS (GitHub or elsewhere), or on your local filesystem with a relative or absolute file path.
Does the import path of B have to be different between development and CI?