Skip to content
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

changing the name of src directory, don't change compilator cache #2613

Closed
3 tasks done
FroggyCorp opened this issue May 26, 2024 · 2 comments
Closed
3 tasks done

changing the name of src directory, don't change compilator cache #2613

FroggyCorp opened this issue May 26, 2024 · 2 comments
Assignees
Labels
conclusion: duplicate Has already been submitted topic: build-process Related to the sketch build process topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@FroggyCorp
Copy link

FroggyCorp commented May 26, 2024

Describe the problem

Hello everyone,

I have files like :

myfile.ino
src/mylib.cpp
src/mylib.h

I get an error at compile time on mylib.h:

[...]\myfile\src\mylib.h:28:55: error: 'TOTO' was not declared in this scope

In fact, mylib.cpp is not include in myfile, because i don't find anyway to avoid compile of mylib.cpp, I just changed the name of directory from src to src2, so my files are now:

myfile.ino
src2/mylib.cpp
src2/mylib.h

But the error is still the same with a wrong directory which doesn't exist anymore (\myfile\src\mylib.h):

[...]\myfile\src\mylib.h:28:55: error: 'TOTO' was not declared in this scope

The fault occurs when the files are under a subfolder that contains any name starting with s.

The fault does not occur after I change the folder name to something that does not start with s.

To reproduce

  1. Create a sketch.
  2. Create src directory inside.
  3. Create some library inside src/ which produces a compile error.
  4. Change name of src/ to s/.
  5. Compile the sketch again.

Expected behavior

Checking that files still exists in path

Arduino IDE version

2.3.2

Operating system

Windows

Operating system version

10

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@FroggyCorp FroggyCorp added the type: imperfection Perceived defect in any part of project label May 26, 2024
@per1234 per1234 self-assigned this May 26, 2024
@per1234 per1234 transferred this issue from arduino/arduino-ide May 26, 2024
@per1234 per1234 added topic: code Related to content of the project itself topic: build-process Related to the sketch build process labels May 26, 2024
@per1234
Copy link
Contributor

per1234 commented May 26, 2024

Hi @FroggyCorp. Thanks for taking the time to submit an issue.

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.


You can follow the instructions at #1240 (comment) to workaround the bug.

The fault does not occur after I change the folder name to something that does not start with s.

I think the fact the fault no longer occurred after you did that was purely coincidental. I tested it myself and the fault still occurs for me even after renaming the folder to something that does not start with s. My guess is that you saved the sketch to a different name at the same time. Doing that causes a new temporary build folder to be used.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label May 26, 2024
@FroggyCorp
Copy link
Author

Hey,

No problem :)

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: build-process Related to the sketch build process 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