Skip to content

Use of multiple items in DefineConstants is escaped #2755

Description

@raghur

Description

Setting multiple items in DefineConstants is getting mangled. None of the following work:

// semi colon
("DefineConstants", "ENABLE_SAMPLE_SVC;PREPRODUCTION_ENV") :: defaultProps

// value
("DefineConstants", "ENABLE_SAMPLE_SVC=;PREPRODUCTION_ENV=;") :: defaultProps

// space as separator as mentioned in #1385 
("DefineConstants", "ENABLE_SAMPLE_SVC PREPRODUCTION_ENV") :: defaultProps


Repro steps

Try to define multiple compiler constants

Expected behavior

Both compiler constants must be defined

Actual behavior

  1. in first 2 cases, the value is escaped and hence not considered.
  2. In 3rd case, space is not escaped but not treated as a separator either

Known workarounds

NA

Related information

  • Operating system
% dotnet --info                                                                 [1:18:52 PM]|(Sandbox)
.NET SDK (reflecting any global.json):
 Version:   6.0.120
 Commit:    d63b17be66

Runtime Environment:
 OS Name:     manjaro
 OS Version:
 OS Platform: Linux
 RID:         arch-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.120/

Host:
  Version:      7.0.9
  Architecture: x64
  Commit:       8e9a17b221

.NET SDKs installed:
  6.0.120 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet]

global.json file:
  /home/raghu/code/ra/Lemans-Common-Services/global.json

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Activity

  1. github-actions commented on Aug 7, 2023

    @github-actions
    Contributor

    Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions