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

@polatengin polatengin self-assigned this Oct 9, 2025
@polatengin polatengin linked an issue Oct 9, 2025 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

Dotnet Test Results

    96 files   -     48      96 suites   - 48   40m 24s ⏱️ - 23m 16s
12 430 tests  -     13  12 430 ✅  -     13  0 💤 ±0  0 ❌ ±0 
28 605 runs   - 14 296  28 605 ✅  - 14 296  0 💤 ±0  0 ❌ ±0 

Results for commit 50e0b76. ± Comparison against base commit a08ac8b.

This pull request removes 1950 and adds 657 tests. Note that renamed tests count towards both.

		nestedProp1: 1
		nestedProp2: 2
		prop1: true
		prop2: false
	1
	2
	\$'")
	prop1: true
	prop2: false
…
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var foo = {
")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var multilineString = '''
Line 1
Line 2
Line 3
'''")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var outRoleAssignments object[] = union(map(
  filter(varMockedEntraGroupIds, item => !contains(item.uniqueName, 'DevOps')),
  group => {
    principalId: group.groupId
    definition: group.roleToAssign
    relativeScope: ''
    principalType: 'Group'
  }
),[
  {
    principalId: '22222222-2222-2222-2222-222222222222'
    definition: 'Reader'
    relativeScope: ''
    principalType: 'ServicePrincipal'
  }
])")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var test = {
  abc: 'def' // boo
}")
Bicep.Cli.UnitTests.Services.ReplEnvironmentTests ‑ ShouldSubmitBuffer_terminates_at_expected_point ("var varMockedEntraGroupIds = [
  {
    uniqueName: 'Reader-Group'
    roleToAssign: 'Reader'
    groupId: '11111111-1111-1111-1111-111111111111'
  }
  {
    uniqueName: 'Contributor-Group'
    roleToAssign: 'Contributor'
    groupId: '22222222-2222-2222-2222-222222222222'
  }
  {
    uniqueName: 'DevOps-Group'
    groupId: '33333333-3333-3333-3333-333333333333'
  }
]")
Bicep.Core.IntegrationTests.AzTypesViaRegistryTests ‑ Bicep_compiler_handles_corrupted_extension_package_gracefully (\u001f�\u0008\u0000\u0000\u0000\u0000\u0000\u0000
�ӽ
�0\u0010\u0007��>E�\u0001��������\u0003D{�b�4\u0011\u0002⻛\u000e�bqi�`~c� �\u000b�6Yٰ@[`��%L\u0018�\u001aDZʷ�
.
��	\u0008\u0018�\u000c!4t>�\u001bW�m\u001dG\u0019�\u001f����C�sn4\u0017ʀ\u0014\u000cr�M6\u001d�ڶ�Ƨ�b�~~�
\u000c���U�^�����I������O�\u0007!	W\u0010��i�\u0005\u0001�T즃d������u��[��\u0012�
��\u0019�ٓ���gK�$I��\u0000���x\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
��K
�0\u0010\u0006�=EO���Y\u0017ݻ�
A\u000b>h*MK\u000b��M\u0017��\u00147�\u0011̷�0d2��ތ��\u001c��QY\u0008�)Y\u001axJ���\u0004%\u0012�/@@K�\u0008���'	�]gZ?�\u001aw� Vd�;�U�Z!�\u001a\u0004���Ȕ���a����t���W�\u000c�^\c��z�!�C�����֊>�\u001f�\u0011���\u0014W��\u001f���_%�����#�\u0004I�$I\u000cO"���\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
��M\u000b�0\u0018\u0007��\u0014�\u0007���-�\u0010t�\u0008\u000b��1R�@\u000b5\u0010���CtQ��\u0012��q�\u0003{��\u001f���^':N�\u0012\u000b���Q������7\u0008W��7@��P\u00089ux��.�(c������*͒�(I�P�\u0019\u0006��Ttfj�\u001a�;w]]�4��\u001a_�[޴g]�S\u001f���y���[��rD\u0004��S�$C �`&��d����t��܆��氋܅c~�g�,˲��\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� �K�K�BЂ\u001f4�6ł����R[���\u001c�]8�"۹~[�CٴBI�L��ADy>�>@�\u000c�\u000b00Z\u0011c��}�\u0011]\u001b\\u0013WYb�\u000f���p��\u0002
��d�
��ȚM��'kȯ.\u001c��_|}����~h��\u001a��h2��~ߚ�)�\u0000���\u0018}I\u0008y�?��G�H&�<����\u001b$I�$kx\u0002(\u000bv=\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��K
�0\u0010\u0006�=E�\u0001�y*t�Fp�\u0001�\u001d�bki+\u0014Ļ\u001b\u0017���\u000f�|���L\u0018~6߸v�.Ūf"\u0006�3�7�\u001fߟ�4��\u0017 `�\u0014�ж�M>�֍��*c��A����rL��\(m�eF����|m�U�\u000bZ��dE�-;՗�ٞw�O�͠��~�����\u0010�p\u0005>��� 	h%���(�����h�-�-q�`��|�U��\u0007w��>�nA\u0010\u0004�p\u001eR��\u0000\u000c\u0000\u0000,"Value cannot be null. (Parameter 'source')")
…

♻️ This comment has been updated with latest results.

@polatengin polatengin merged commit 6c5e677 into main Oct 27, 2025
42 checks passed
@polatengin polatengin deleted the polatengin/18221-import-from-a-bicep-file-in-a-bicepparam-file-fails-to-build branch October 27, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants