cget icon indicating copy to clipboard operation
cget copied to clipboard

dont use global include dir

Open maddanio opened this issue 3 years ago • 7 comments

its not neccessary and makes it harder to isolate components

maddanio avatar Jan 08 '21 14:01 maddanio

This is set so when installing header only libraries with -X header, the headers will be available. I guess build scripts should do find_path. What issues are you seeing with isolation? All components are symlinked into the same directory, so I am not sure what kind of isolation you want to achieve.

pfultz2 avatar Jan 08 '21 16:01 pfultz2

I am just generally concerned with determinism, i.e. that the build of one package is not influenced by the presence of another, especcially for build caching. and also that when in cmake I use one package i dont get to see another "for free" so I can guarnatuee that only the specified dependencies are visible. header only should also be discoverable from the package dir, no?

maddanio avatar Jan 10 '21 12:01 maddanio

hmm, I cant find this header thing. -X is for specifying a cmake file, right? Ah, header.cmake :). Hmm, couldnt that produce a findable package?

maddanio avatar Jan 11 '21 07:01 maddanio

ok, I looked at header.cmake and tried to make it generate a config file, but I think its a bit too complex, also I dont really need it right now, so I will leave it alone. still i would like to avoid having all headers visible all the time, so I think I will just make this switchable

maddanio avatar Jan 11 '21 08:01 maddanio

ok, added --no-global-include to init fo this to be optional, ok?

maddanio avatar Jan 11 '21 08:01 maddanio

Also, are you able to add a test for this? I think a simple test like this just to get coverage could be added in test/test_cget.py:

def test_disable_global_include_toolchain(d):
    d.cmds([
        cget_cmd('init', '--disable-global-include'),
        cget_cmd('install', '--verbose --test', get_exists_path('libsimple'))
    ])

pfultz2 avatar Jan 21 '21 19:01 pfultz2

DeepCode's analysis on #9a5780 found:

  • :warning: 1 warning, :information_source: 3 minor issues. :point_down:
  • :heavy_check_mark: 7 issues were fixed.

Top issues

Description Example fixes
hashlib.sha1 is insecure. Consider changing it to a secure hashing algorithm (e.g. SHA256). Occurrences: :wrench: Example fixes
standard import "import base64, copy, argparse, six, dirhash, hashlib" should be placed before "import base64, copy, argparse, six, dirhash, hashlib" Occurrences: :wrench: Example fixes
Imports from package base64 are not grouped Occurrences: :wrench: Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

ghost avatar Jan 26 '21 21:01 ghost