Git Product home page Git Product logo

Comments (6)

memsharded avatar memsharded commented on July 18, 2024

Hi @IanCollins

Thanks for your report.

It would be necessary a bit more of detail: the exact profile file that you are using, for example, and a basic command or conanfile to reproduce. For example, it would be necessary to use the new [buildenv] in the profile, not the legacy [env]. Could you please provide these details? Thanks!

from conan.

memsharded avatar memsharded commented on July 18, 2024

Hi @IanCollins

Please let us know if you can provide those details. Thanks!

from conan.

IanCollins avatar IanCollins commented on July 18, 2024

Sure, sorry I missed the first message.

Yes, the profile does use [buildenv]. One example:

default.jinja:
`[conf]
tools.env.virtualenv:auto_use = True

[buildenv]
AR = ar
AS = as
RANLIB = ranlib
CC = clang
CXX = clang++
STRIP = strip

CFLAGS = -w
CXXFLAGS = -w

[settings]
os = Linux
arch = x86_64
compiler = clang
compiler.version = 16
compiler.cppstd = 17
compiler.libcxx = libstdc++11
build_type = Release

[options]
*:shared = False`

native_linux_clang_release_static.jinja:
`include(default.jinja)

[settings]
build_type=Release
os.platform_name="None"

[options]
*:shared=False`

After running a conan install, we have a generated conanbuildenv-release-x86_64.sh with the following exports:
`export CXXFLAGS=" -w"

export CFLAGS=" -w"

export STRIP=" strip"

export CXX=" clang++"

export CC=" clang"

export RANLIB=" ranlib"

export AS=" as"

export AR=" ar"`

from conan.

memsharded avatar memsharded commented on July 18, 2024

Thanks for the details.

I have been checking this, the code internals, etc.

Check the PR #10343
And issue: #10334

There is even a comment in code:

# values are not strip() unless they are a path, to preserve potential whitespaces
name = name.strip()

It seems that this is mostly expected. The definition of environment variables values can accept any arbitrary value, including strings with leading spaces. We could argue that users could define quotes, but it happens that some users also want strings with literal quotes for values, and that further complicate things.

Please note that in the documentation spaces are not used around "=" in profiles: https://docs.conan.io/2/reference/config_files/profiles.html

So the leading space in env-vars values is not being automatically removed, please make sure to not include that leading space, unless you explicitly want it.

from conan.

IanCollins avatar IanCollins commented on July 18, 2024

Okay, thank you for checking.

This is somewhat counterintuitive, but I'm sure I can fight my programmer's urge to line up my variables!

from conan.

memsharded avatar memsharded commented on July 18, 2024

This is somewhat counterintuitive, but I'm sure I can fight my programmer's urge to line up my variables!

Yep, I know, but sometimes it is complicated to cover all edge cases, and some ergonomics might be lost there.

from conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.