Giter Club home page Giter Club logo

Comments (5)

Viladoman avatar Viladoman commented on September 14, 2024

Interesting!

I assume the C:/Users/Jim Viebke/Dropbox/Code/C++/Prime Bitstrings/ folder exists. The extractor is complaining that the previous string was not accepted as a directory check for some reason. The extractor code is just doing a direct call to the C++ filesystem IsDirectory.

You could try something like $(SolutionDir)obj\... or wherever the objects files are created in the extension configuration, to make sure there are no typos.

I am also thinking that maybe the Dropbox folder is messing with the C++ filesystem api. Another thing to try might be to move the project in a different location.

It is strange that a straight forward check like IsDirectory fails on a real folder.

from compilescore.

JimViebke avatar JimViebke commented on September 14, 2024

Thanks for looking at this. I should have noted that the path is correct, Dropbox was not running, and VS has elevated permissions.

I copied the solution folder to C:/tmp/ and changed the configuration as follows:

{
  "ScoreSource": 1,
  "ScoreLocation": "$(SolutionDir)Compile Score/compileData.scor",
  "ScoreGenerator": {
    "Compiler": 1,
    "InputPath": "$(SolutionDir)",
    "OutputPath": "$(SolutionDir)Compile Score/compileData.scor",
    "OverviewDetail": 3,
    "TimelineDetail": 3,
    "TimelinePacking": 100,
    "ExtractIncluders": true,
    "CollapseTemplateArgs": true
  }
}

Output:

[00:04:07] Calling ScoreDataExtractor with -clang -start -i C:\tmp\Prime Bitstrings\
[ERROR] input path is not a directory.
Execution Time: 00ms
[00:04:07] [ERROR] Score Data Extractor failed to start the recording session with code -1. The current build data won't be captured. Please check the output pane for more information.
[00:04:11] Building...
[00:04:36] Calling ScoreDataExtractor with -clang -stop -tp 100 -td 3 -d 3 -i C:\tmp\Prime Bitstrings\ -o "C:\tmp\Prime Bitstrings\Compile Score/compileData.scor"
[ERROR] input path is not a directory.
Execution Time: 00ms
[00:04:36] [ERROR] Score Data Extractor process failed with code -1. Please check the output pane for more information.
[00:04:38] Score generation completed!
[00:04:38] Score file main processed in 373 μs
[00:04:38] Score file globals processed in 1.266 ms

Build output: (the warning is regarding PGO data and should be unrelated)

Rebuild started...
1>------ Rebuild All started: Project: Prime Bitstrings, Configuration: Release x64 ------
1>warning: profile data may be out of date: of 1257 functions, 5 have mismatched data that will be ignored [-Wprofile-instr-out-of-date]
1>1 warning generated.
1>Prime Bitstrings.vcxproj -> C:\tmp\Prime Bitstrings\x64\Release\Prime Bitstrings.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
========== Rebuild started at 12:04 AM and took 28.968 seconds ==========

from compilescore.

Viladoman avatar Viladoman commented on September 14, 2024

That's super strange! I can see the extension is computing the paths properly as $(SolutionDir) became C:\tmp\Prime Bitstrings\.

There is something obscure happening with the std::filesystem in there.

Would it be possible to run a simple program like below?

#include <filesystem>
#include <cstdio>

int main()
{
    const char* path = "C:\tmp\Prime Bitstrings\";
    if ( std::filesystem::is_directory( path ) )
    {
        printf("FOUND DIR!");
    }
    else
    {
        printf("NOT FOUND!");
    }
}

if this succeeds then the only explanation would be that the 'const char*' does not reach properly the application. Then cloning the repo and putting a breakpoint in the ScoreDataExtraction line provided above with the command line printed in the output pane should bring more light to the mystery.

from compilescore.

JimViebke avatar JimViebke commented on September 14, 2024

The code exactly as is reads each backslash as an escape sequence, so it does not build, but changing the path to either of "C:/tmp/Prime Bitstrings/"; or R"(C:\tmp\Prime Bitstrings\)"; correctly prints "FOUND DIR!".

from compilescore.

Viladoman avatar Viladoman commented on September 14, 2024

Out of curiosity. Did you figure out why that folder was cursed and did not work?

from compilescore.

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.