Project

General

Profile

Bug #7560

fcl does not understand files that have lines terminated by cr-nl

Added by Rob Kutschke almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Infrastructure
Target version:
Start date:
12/19/2014
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Occurs In:
Scope:
Internal
Experiment:
Mu2e
SSI Package:
fhicl-cpp
Duration:

Description

Earlier today I was emailed a .fcl file which I saved to disk and then could not use. The problem turned out to be that the file had lines terminated DOS style with cr-nl, not with a simple nl.

I have attached a one line file, foo.fcl, that contains an example:

#include "minimalMessageService.fcl"

Hopefully the error is not removed by redmine. Anyway, when I ran this through art it gave the error:

Failed to parse the configuration file 'foo.fcl' with exception
---- Malformed #include directive: BEGIN
#include "minimalMessageService.fcl"
at line 1 of file ./foo.fcl
---- Malformed #include directive: END
Art has completed and will exit with status 7002.

Note that it gives this same message whether or not the included file actually exists in FHICL_FILE_PATH.

I request that FHICL be updated to be able to handle files with lines terminated by cr-nl.

foo.fcl (38 Bytes) foo.fcl Rob Kutschke, 12/19/2014 05:28 PM

History

#1 Updated by Kyle Knoepfel almost 6 years ago

  • Category set to Infrastructure
  • Status changed from New to Accepted
  • Assignee set to Christopher Green
  • Target version set to 1.13.00
  • Estimated time set to 2.00 h
  • SSI Package fhicl-cpp added
  • SSI Package deleted ()

Time estimate depends on our initial analysis that this is a trivial change to the white-space skipper being accurate.

#2 Updated by Christopher Green almost 6 years ago

Fixed with cetlib:7054b87, cetlib:5c7d15f, and cetlib:c9f2ee0. The problem was actually in cetlib:source:cetlib/includer.cc and cetlib:source:cetlib/include.cc, as the FHiCL parser already handled the problem by using boost::spirit::ascii::space as part of its whitespace skipper.

#3 Updated by Christopher Green almost 6 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

#4 Updated by Christopher Green almost 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF