Skip to content

Conversation

polatengin
Copy link
Member

@polatengin polatengin commented Oct 9, 2025

Description

Fixes #18221

consts.bicep

@export()
var someGlobal = 'someValue'

base.bicepparam

import * as consts from 'consts.bicep'

using none

param testParam1 = consts.someGlobal

main.bicepparam

using 'main.bicep'

extends 'base.bicepparam'

param testParam2 =  'someOtherValue'

main.bicep

param testParam1 string
param testParam2 string

dotnet run --project ./src/Bicep.Cli -- build-params ./main.bicepparam succeeds with this changes.

Checklist

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Test this change out locally with the following install scripts (Action run 18387389713)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 18387389713
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 18387389713"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 18387389713
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 18387389713"

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Dotnet Test Results

    96 files   -     48      96 suites   - 48   43m 4s ⏱️ - 37m 25s
12 411 tests  -     12  12 411 ✅  -     11  0 💤 ±0  0 ❌  - 1 
28 567 runs   - 14 274  28 567 ✅  - 14 273  0 💤 ±0  0 ❌  - 1 

Results for commit 259aab2. ± Comparison against base commit 6bb5d5f.

This pull request removes 1919 and adds 653 tests. Note that renamed tests count towards both.

		nestedProp1: 1
		nestedProp2: 2
		prop1: true
		prop2: false
	1
	2
	\$'")
	prop1: true
	prop2: false
…
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӽ\u000e� \u0010\u0007p�>�O�w\u0007�\u000e�\u001d�
�5�G�F15i��šI\u0007L\u0017�M�o�p@�<ݙa[�C�v�
)S��\u0006^&ep}�
\u0019�\u0017`���a�I\u0002�Ι֏��Y?��ĸS]��3\u0000	*�8�Ba!6����ar5�X��b���箱cC=հ�E������\u0013}�?\u00001T�	P\u0010��?���_$�����c�	�(��5<\u0001���\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
��K\u000e�0\u0010\u0006�=E�\u0001��\u0001&�ݘ��\u0000\u0015ƈ\u0011$�	����¸���ab���$����zo�-�\u0004ˊ�P�5#c��������\u0010nހ�Q�\u0013B��7�q�j[���q�\u000f\u0012\u0001�u�ač\u0006��\u0002�|�\u0016����C=\u001e����(�\u0013lإ���x64��5�\u0001����\u001f|I�\u0002#���\u000b\u0002Z�\u0015Bg����A�C�M�q��\u000e�#�ކ����һ9��8�y\u0001\u000f!4�\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
��M\u000b�0\u0018\u0007��\u0014�\u0007���^2�\u0010t�\u0008\u000b��1r��\u0016j �囇�t�%h��\u0007�l�?��U��*�E�i���Q��\u0010���7��\u0011�\u0006\u0008$�\u0002!��}�\u0016��R�\u0019e��~\u0010����L�D
\u0000\u0006|.0�<\u0000�fJ�\u0012	���.a�'����7�YG��g��}^p�[����&�\u001c$\u0005�SB\u0011\u0008��&��d����t����F��氋݅c~�g�,˲��\u0002O�\u0010\u0002\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003�ӽ
�0\u0010\u0007��>E�\u0003Ļ6\u001fV��"��\u0000ў��Z�
\u0001��m\u0007q��h+�ߘ;�\u000b�_LW�/��T;\u0011�39\u0015�Ӡ��|y�Ai\u0018�\u0007``�V�q��M^�����*C��A���PP�F\u0003$�J�P��X�I[���0�m�١�ɋ�;�]{��>�5�\u001e���ތw�o�\u0008C\u0005&\u0006D��@���� ����_y�.�W�m(_R��:��=9���[\u0010\u0004A�=w\u0013�o�\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003���
�0\u000c\u0007��\u0014}��Ԛ̃�\u001d�
e\u0013��u���ػ�\u001e\u0006;(�8\u001d��c\u0013HJ��ho�]n�yU+�nM����#cF�\u0007hH ��\u0000N�w�~�MF�uc+��\u0012�~�fi�s�g�\u0004\u0010�I��hb�/\u001d�J(o�9e����s�R�n�/&���e0���ߚ�)�\u0000Z`\u0002�\u0001\u0011	}�Q�<�E2����?�� \u0008� X�\u0013\u001d�ԓ\u0000\u000c\u0000\u0000,"The path: index.json was not found in artifact contents")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000\u0003���
�@\u0010\u0000�=�\u0014�\u000f����h�!�\u0011\u0015\u0004]cI!\u0003-�@��[\u000f�%�\u0016��qg`f\u0019f����"�IZV�\u000b\u0003�2�70$�o�[�\u0015A�\u0004\u0004���\u0010����\u001b��֥ie�Z?�\u000b���<�PI\u0000?\u0014�b<03���Ď]1\u000c�Uק(+��a��R��yW���iux�o�\u001a��\u001f<NP��\u0000\u0011%\u0012��7�t������;�z?[���r�Y;Sj.�{�,˲��\u0000l���\u0000\u000c\u0000\u0000,"'7' is an invalid end of a number. Expected a delimiter. Path: $.INVALID_JSON | LineNumber: 0 | BytePositionInLine: 20.")
Bicep.Core.IntegrationTests.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("output loopOutput array = [for i in range(0, 2): {
  prop: map(containerWorkers, (w) => w.properties.ipAddress.ip)
}]")
Bicep.Core.IntegrationTests.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("resource propertyLoop 'Microsoft.ContainerInstance/containerGroups@2022-09-01' = {
  name: 'gh9440-loop'
  location: 'westus'
  properties: {
    containers: [for i in range(0, 2): {
      name: 'gh9440-w1c-${i}'
      properties: {
        command: [
          'echo "${join(map(containerWorkers, (w) => w.properties.ipAddress.ip), ',')}"'
        ]
      }
    }]
  }
}")
Bicep.Core.IntegrationTests.DirectResourceCollectionTests ‑ DirectResourceCollectionAccess_NotAllowedWithinLoops ("var loopVar = [for i in range(0, 2): {
  prop: map(containerWorkers, (w) => w.properties.ipAddress.ip)
}]")
Bicep.Core.IntegrationTests.Emit.ParamsFileWriterTests ‑ Params_file_with_no_errors_should_compile_correctly ("
using 'main.bicep'

// involves all syntax
param myParam = {
  arr: [
    {
      a : 'b'
    }
    {
      c : true
    }
  ]
  name: 'complex object!'
  priority: 3
  val: null
  obj: {
      a: 'b'
      c: [
          'd'
           1
      ]
  }
}","
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "myParam": {
      "value": {
        "arr" : [
          {
            "a" : "b"
          },
          {
            "c" : true
          }
        ],
        "name" : "complex object!",
        "priority" : 3,
        "val" : null,
        "obj" : {
          "a" : "b",
          "c" : [
            "d",
            1
          ]
        }
      }
    }
  }
}","
param myParam object
")
…

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import from a bicep file in a bicepparam file fails to build

1 participant