Skip to content

Sketch source move to build folder bug: file extension changing #1699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
VNovytskyi opened this issue Mar 26, 2022 · 1 comment
Closed

Sketch source move to build folder bug: file extension changing #1699

VNovytskyi opened this issue Mar 26, 2022 · 1 comment
Assignees
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@VNovytskyi
Copy link

VNovytskyi commented Mar 26, 2022

Brief

The problem consists of wrong Arduino CLI builder behaviour. When executing Arduino builder it creates a folder build/sketch/ and copies the source files into it. If we change the file extension the builder doesn't remove the old version of the file and still trying to build your application with the old file.

Steps to reproduce

  1. Create a new project with files: test.ino, myLib.h, myLib.c
  2. Write wrong code in myLib.c to creating the build error
  3. Try to build the project
  4. Rename myLib.c to myLib.cpp and fix the build error
  5. Try to build the project again

Current behaviour

Arduino builder tries to build the project with myLib.c though myLib.cpp is in build/sketch/

Expected behaviour

Arduino CLI's builder must detect changing file extension and remove old file myLib.c and use new myLib.cpp

Command

arduino-cli compile --fqbn esp32:esp32:esp32:PSRAM=disabled,PartitionScheme=fatflash,CPUFreq=240,FlashMode=dio,FlashFreq=80,FlashSize=16M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=debug esp-xmodem-lib-file-test --build-path build --build-cache-path build --port COM11 --upload --export-binaries -v

Environment

  • Arduino-cli version: 0.21.1 Commit: 9fcbb39 Date: 2022-02-24T15:41:45Z
  • Windows 10 Pro 21H1 19043.1586
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Mar 31, 2022
@per1234
Copy link
Contributor

per1234 commented Mar 31, 2022

Thanks for taking the time to submit an issue @VNovytskyi.

I see we have another report about this at #1240.

It is best to have only a single issue per subject so we can consolidate all relevant discussion to one place, so I'll go ahead and close this in favor of the other.

If you end up with additional information to share, feel free to comment in the other thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants