Arduino IDE 1.6.6 does not compile code with namespace

I am testing this simple code with a namespace, and I am getting "sketch_nov03a:8: error: 'namespaceTest' does not name a type" error.
This works perfectly fine in any older version of the IDE . How to enable Arduino IDE 1.6.6 to compile namespaces? I need them for my project.

namespace Test
{

}

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

Did you copy and paste that or just type it back in to the post?

The reason I ask is that in your posted code there is a space between namespace and Test like there should be. But in the error message there is no space, it's all jammed into one word.

Delta_G:
Did you copy and paste that or just type it back in to the post?

The reason I ask is that in your posted code there is a space between namespace and Test like there should be. But in the error message there is no space, it's all jammed into one word.

yes, the code is pasted from the original sketch. No matter how many spaces I add the error reports it like : 'namespaceTest' :frowning: .

I am installing a clean VM to test there. Did the install on my main system, and want to make sure this is not due to some old version or something...

I don't know about any version issues. I'm still on 1.0.6 cause it works and none of my PROGMEM code breaks. Usually when I'm playing the namespace game I've got the namespace in a header file.

This is a 1.6.6 specific issue. It works fine with all other versions :frowning: .
I need to have some of the code of the sketch in namespaces, as the code is generated by Visuino and in order to avoid name conflicts I have to organize it in namespaces.

The simplest answer would be to back off a version. There's no rule that says you always have to use the latest release. I usually don't just for this reason, unknown issues.

Delta_G:
The simplest answer would be to back off a version. There's no rule that says you always have to use the latest release. I usually don't just for this reason, unknown issues.

The problem is that I need to support the latest version with Visuino. What to do with the users that try to use it with 1.6.6 ? Tell them all to switch to the older version? This is a very simple code, and there should not be a problem compiling it :frowning: . It's not like it is something really complex, it's just a namespace declaration... :frowning:

I feel ya man. I'm just giving you options to get your code to compile.

It is perfectly reasonable to tell a library user what version your code works with. 1.6.6 won't be the last. What if you get this all working and everything is good and then 1.7 comes out and they rename digitalRead or something?

Delta_G:
It is perfectly reasonable to tell a library user what version your code works with. 1.6.6 won't be the last. What if you get this all working and everything is good and then 1.7 comes out and they rename digitalRead or something?

It's not a library users. It is the Visuino users - https://www.visuino.com aver 6000 of them already :-(, and those are just in the community, I am scared of what will happen in few days... :frowning:

mitov:
It's not a library users. It is the Visuino users - https://www.visuino.com aver 6000 of them already :-(, and those are just in the community, I am scared of what will happen in few days... :frowning:

You've still got the same issue. Even if you get it working with 1.6.6, there's no guarantee that it works with the next version.

It's got your name on it, so I assume you have some measure of control over that project. Package a copy of the IDE with it with whatever version you want. Or screw the IDE and package the toolchain with it.

OP reported this issue to the tracker: Arduino IDE 1.6.6 does not compile code with namespaces · Issue #4075 · arduino/Arduino · GitHub

Delta_G:
You've still got the same issue. Even if you get it working with 1.6.6, there's no guarantee that it works with the next version.

So, I guess your attitude is just ignore bugs because they don't get fixed...Huh?
Some of us don't have the luxury of using a year plus old IDE, we have newer items that rely newer coding.

Mostdanger:
So, I guess your attitude is just ignore bugs because they don't get fixed...Huh?
Some of us don't have the luxury of using a year plus old IDE, we have newer items that rely newer coding.

No, not at all. My attitude is to use stable code. The latest release of anything open source rarely meets that requirement. I tend to think of the latest as the "experimental version" that we hope works and the one before it as the "one that's known".

You don't need year old code, just back off one version and get it working .

Or better yet, forget the Arduino IDE and package the toolchain with your code. That way you're not tied to these guys hoping their latest updates don't break your code.

As fast as these guys pop out new versions, you'll never keep up and by the time you get this one working they'll have a new version that won't jive for some other reason. The best you can ever hope for is to be one release behind them cause you never know what they're going to break next.

I mean it's your stuff, if you want to wait for these guys to fix their code then that's certainly an option. All it does is delay your release. You're basically stuck there, release with a previous IDE version or don't release until they fix it. Neither of those is optimal, so you gotta pick the lesser of two evils. Which one youd rather do is entirely up to you.

Sorry for trying. Best of luck to ya.

Delta_G:
No, not at all. My attitude is to use stable code. The latest release of anything open source rarely meets that requirement. I tend to think of the latest as the "experimental version" that we hope works and the one before it as the "one that's known".

My problem is that I provide IDE to support very much any Arduino compatible platform with very much any tool-chain, but the end users may have different Arduino IDE already installed. My IDE has to work with whatever they already have :frowning: . It is a big problem when the current official Arduino IDE is so broken :frowning:

Have you ever bought any software? Windows 10 just came out and there are a ton of things that won't work with it because there hasn't been time to make an effort to work around the things microsoft broke. So if you look on the back of the package for any software you buy it says what it is or is not compatible with. If you go to download software, it might well say, "doesn't work with Windows 10." There are complaints all over about that.

It is perfectly reasonable to tell people using one software what other software it works with.

Now if YOU are writing both softwares then yes, you have to power to make sure the two codes work together. But you're not in control of these guys.

Trying to support every single version of someone else's broken code is an exercise in futility. You'll never get to release. And even if you do get it working with 1.6.6, you'll have to say that's the latest version it supports because you don't know what's coming next until after is comes. So like it or not, you're going to have to list a latest version of Arduino that you know you have compatibility with.

When they come out with a new board that you don't support yet, what will you do then? Pull the whole project and tell people it isn't available until you can write code for that new board? Or make a note on your site that support for it is "coming"?

But like I said, it's your decision whether to get a release out or sit on your hands and wait for someone else to do their job. If sitting and waiting is what you want to do then do that and stop arguing. If getting your release out is what you want to do then do that and stop arguing. I don't see where arguing with me is doing anything productive for you. You know what you're up against, pick an option.

mitov:
My problem is that I provide IDE to support very much any Arduino compatible platform with very much any tool-chain, but the end users may have different Arduino IDE already installed. My IDE has to work with whatever they already have :frowning: . It is a big problem when the current official Arduino IDE is so broken :frowning:

Simple answer then. Don't release your code yet and wait. Now instead of most people being able to use it but not a few, nobody will be able to use it. That's your choice, not mine. I don't care even a little. I don't need a graphical program writing program. I can write my own code. I'm not going to miss this not being out. So don't try to satisfy me. If you want to hold of on your release then hold off on your release.

What do you want me to say?

And even if they fix this in 1.6.7, you're still going to have to tell people it doesn't work with 1.6.6 because that has been released so it's not going to change.

Delta_G:
And even if they fix this in 1.6.7, you're still going to have to tell people it doesn't work with 1.6.6 because that has been released so it's not going to change.

It is not problem when the current official version works, as they usually always check that. so when they fix in 1.6.7 and make it official, this will not be a problem. Until then, I am in big trouble :frowning:

mitov:
It is not problem when the current official version works, as they usually always check that. so when they fix in 1.6.7 and make it official, this will not be a problem. Until then, I am in big trouble :frowning:

OK, so wait and stop bitching. I'm sure the brightest minds in open source programming are on the case and you'll get a fix in a few weeks / months / years. Until then, nobody will be able to use it even if they have an older IDE.