bicep icon indicating copy to clipboard operation
bicep copied to clipboard

If you republish a module then force restore, the source displayed is the previous one, but the document links are from the new sources

Open StephenWeatherford opened this issue 1 year ago • 1 comments

  1. Create two files:

main.bicep:

module module1 './module1.bicep' = {
  name: 'module1'
}

module module1b './module1.bicep' = {
  name: 'module1b'
}

module1.bicep: (empty)

  1. publish: bicep publish main.bicep --target br:.azurecr.io/bug:v1--with-source

  2. create new bicep file "test.bicep"

module m1 'br:<yours>/bug:v1' = {
  name: 'm1'
}
  1. Press F12 on "bug:v1" and click to see the Bicep source image

  2. change main.bicep to look like this: main.bicep:

module module1 './a/../module1.bicep' = {
  name: 'module1'
}
// some extra lines are intended to be here
// some extra lines are intended to be here
module module1b '.a/../module1.bicep' = {
  name: 'module1b'
}
  1. republish with --force
  2. Force restore modules in test.bicep
  3. Press F12 on "bug:v1" !) it shows the old source, and notice the links don't line up with the source:

image

EXPECTED:

what you get after you reload vscode: image

StephenWeatherford avatar Jan 22 '24 20:01 StephenWeatherford

It's likely this repros with the current released version, but I haven't tested it there, only main.

StephenWeatherford avatar Jan 22 '24 20:01 StephenWeatherford