Skip to content

PATH_MAX error on AppVeyor #269

@jdblischak

Description

@jdblischak

With the release of fs 1.3.2 in March, the AppVeyor build of my workflowr package started failing with the error message Total path length must be less than PATH_MAX: 260, which was added in PR #233.

I'm having a real hard time debugging the issue because I can't reproduce it. The error doesn't happen locally on my Windows 10 machine. And when I remotely login to the AppVeyor server, I can't reproduce the error by manually running R CMD check or devtools::check(). I'm confused how it only occurs (consistently) when R CMD check is run automatically.

The line that errors is simply trying to delete one R Markdown file (to cleanup after a test has completed). The failure happens earlier though when trying to convert the path to an absolute path. I use this same strategy in multiple other tests, but for some reason it fails here. I'd appreciate any advice or insight on how I might be able to fix the issue (or even just to be able to reproduce it manually).

Here's the error message produced by R CMD check:

  Running 'testthat.R' [14m]
 ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
  Backtrace:
   1. workflowr::wflow_remove(file_w_cache, project = site_dir)
   2. workflowr:::wflow_delete(files_to_remove)
   3. workflowr:::absolute(path)
   4. fs::path_abs(newpath)
   6. fs::path(start, path[!is_abs])
   8. fs:::path_(...)
  
  == testthat results  ===========================================================
  [ OK: 1783 | SKIPPED: 13 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: wflow_build deletes cache when delete_cache = TRUE (@test-wflow_build.R#343) 
  2. Error: wflow_publish deletes cache when delete_cache = TRUE (@test-wflow_publish.R#241) 

https://ci.appveyor.com/project/jdblischak/workflowr/builds/31466909#L1140

I found the full error message by downloading the AppVeyor artifact.

Total path length must be less than PATH_MAX: 260
Backtrace:
 1. workflowr::wflow_remove(file_w_cache, project = site_dir)
 2. workflowr:::wflow_delete(files_to_remove)
 3. workflowr:::absolute(path)
 4. fs::path_abs(newpath)
 6. fs::path(start, path[!is_abs])
 8. fs:::path_(...)

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