Skip to content

Extensions are ignored in tag_html #140

Closed
runejuhl opened this Issue Aug 15, 2012 · 1 comment

1 participant

@runejuhl

When compiling tag_html, Chicago Boss discards the extension from files in the tag_html directory. When using an editor that creates backup files by appending a string to the filename (e.g. Emacs and "~"), this results in compile errors, as the files have the same name when stripped of this extension:

{{badmatch,{error,"compilation failed: src/view/lib/tag_html"}},
 [{boss_load,load_view_lib,3,[{file,"src/boss/boss_load.erl"},{line,239}]},
  {boss_load,load_view_if_old,4,[{file,"src/boss/boss_load.erl"},{line,269}]},
  {boss_load,load_view_if_dev,3,[{file,"src/boss/boss_load.erl"},{line,299}]},
  {boss_web_controller,render_view,6,
                       [{file,"src/boss/boss_web_controller.erl"},{line,835}]},
  {boss_web_controller,execute_action,5,
                       [{file,"src/boss/boss_web_controller.erl"},{line,734}]},
  {boss_web_controller,process_request,5,
                       [{file,"src/boss/boss_web_controller.erl"},{line,460}]},
  {timer,tc,3,[{file,"timer.erl"},{line,194}]},
  {boss_web_controller,handle_request,3,
                       [{file,"src/boss/boss_web_controller.erl"},
                        {line,388}]}]}

As with ErlyDTL templates, Chicago Boss should only compile those files that end in ".html".

@runejuhl

Sorry for the noise -- I had already tried to figure out where it went wrong, but it only hit me after I created this issue. It all happens in erlydtl_compiler:compile_dir/3, so I'll take it up there.

@runejuhl runejuhl closed this Aug 15, 2012
@runejuhl runejuhl referenced this issue in erlydtl/erlydtl Aug 16, 2012
Merged

Only compile files with .html extension. #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.