caizhengxin / vscodefileheader

VSCode File Header
BSD 3-Clause "New" or "Revised" License
23 stars 11 forks source link

Running the contributed command: 'extension.fileheader' failed. #9

Closed rhdlilj closed 3 years ago

rhdlilj commented 3 years ago

After update to v0.6.0: Running the contributed command: 'extension.fileheader' failed. rollback to v0.5.1 works fine

caizhengxin commented 3 years ago

After update to v0.6.0: Running the contributed command: 'extension.fileheader' failed. rollback to v0.5.1 works fine

Windows?

caizhengxin commented 3 years ago

After update to v0.6.0: Running the contributed command: 'extension.fileheader' failed. rollback to v0.5.1 works fine

What is the error message?

rhdlilj commented 3 years ago

Both Windows and Ubuntu Running the contributed command: 'extension.fileheader' failed. is error message . image

caizhengxin commented 3 years ago

Both Windows and Ubuntu Running the contributed command: 'extension.fileheader' failed. is error message . image

I installed vscodefileheader v0.6.0 on windows and Ubuntu, no problem, I don’t know how to trigger it

rhdlilj commented 3 years ago

I tried disable all other extensions, but it doesn't work. Here is my system information.

Version: 1.51.1 (user setup) Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-10T23:34:32.027Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.18363 CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2904)
GPU Status 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled
Load (avg)  
Memory (System) 15.87GB (5.89GB free)
Process Argv --crash-reporter-id 8d550fbd-46ea-4641-8d18-8d7cb3c23d0c --crash-reporter-id 8d550fbd-46ea-4641-8d18-8d7cb3c23d0c
Screen Reader no
VM 44%
Extension Author (truncated) Version
lit-html bie 1.11.1
doxdocgen csc 1.1.0
cmake-integration-vscode go2 0.7.1
vscodefileheader jan 0.6.0
vscode-language-pack-zh-hans MS- 1.51.2
cmake-tools ms- 1.5.3
cpptools ms- 1.1.2
code-spell-checker str 1.10.0
html-preview-vscode tht 0.2.5
errorlens use 3.2.4
vscode-icons vsc 11.0.0
caizhengxin commented 3 years ago

I tried disable all other extensions, but it doesn't work. Here is my system information.

Version: 1.51.1 (user setup) Commit: e5a624b788d92b8d34d1392e4c4d9789406efe8f Date: 2020-11-10T23:34:32.027Z Electron: 9.3.3 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0.18363

CPUs Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (6 x 2904) GPU Status 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: enabled rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled Load (avg)   Memory (System) 15.87GB (5.89GB free) Process Argv --crash-reporter-id 8d550fbd-46ea-4641-8d18-8d7cb3c23d0c --crash-reporter-id 8d550fbd-46ea-4641-8d18-8d7cb3c23d0c Screen Reader no VM 44% Extension Author (truncated) Version lit-html bie 1.11.1 doxdocgen csc 1.1.0 cmake-integration-vscode go2 0.7.1 vscodefileheader jan 0.6.0 vscode-language-pack-zh-hans MS- 1.51.2 cmake-tools ms- 1.5.3 cpptools ms- 1.1.2 code-spell-checker str 1.10.0 html-preview-vscode tht 0.2.5 errorlens use 3.2.4 vscode-icons vsc 11.0.0

You can download the source code, debug

rhdlilj commented 3 years ago

v0.5.1: config.custom_template_path='' v0.6.0: config.custom_template_path=null In getTemplatePath path.join failed.

function getTemplatePath(editor: any, config: any, tmplpath: string="", type: string="header"): string {
    let suffix: string = getSuffix(editor);
    let name: string = getFileName(editor);
    let tmpl: string = (config.file_suffix_mapping[name + suffix] || config.file_suffix_mapping[suffix] || file_suffix_mapping[name + suffix] || file_suffix_mapping[suffix]) + ".tmpl";

    return path.join(tmplpath || config.custom_template_path , type, tmpl);  // failed here
}
caizhengxin commented 3 years ago

v0.5.1: config.custom_template_path='' v0.6.0: config.custom_template_path=null In getTemplatePath path.join failed.

function getTemplatePath(editor: any, config: any, tmplpath: string="", type: string="header"): string {
  let suffix: string = getSuffix(editor);
  let name: string = getFileName(editor);
  let tmpl: string = (config.file_suffix_mapping[name + suffix] || config.file_suffix_mapping[suffix] || file_suffix_mapping[name + suffix] || file_suffix_mapping[suffix]) + ".tmpl";

  return path.join(tmplpath || config.custom_template_path , type, tmpl);  // failed here
}

Good, I set up a custom template, so no problem

ronilaukkarinen commented 2 years ago

I have this same issue. How to fix?