Coder Social home page Coder Social logo

Build Failing because of auto about orbiter HOT 15 CLOSED

n7275 avatar n7275 commented on August 17, 2024
Build Failing because of auto

from orbiter.

Comments (15)

dimitry-ishenko avatar dimitry-ishenko commented on August 17, 2024

It's because the standard was downgraded to c++17 (c4c7be5):

https://github.com/orbitersim/orbiter/blame/main/CMakeLists.txt#L9

and auto function parameters require c++20.

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

As far as I can tell it's NOT been downgraded. It was raised to C++20 without authorization and some commits been made that require C++20. I would hope to focus on development instead of playing with the Git.

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

The GitHub Build checks didn't fail a week ago, so what changed. Visual Studio 2019 builds/compiles the code without issues, so, the problem seems to be GitHub related.

from orbiter.

n7275 avatar n7275 commented on August 17, 2024

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

I spent some time reading old forum posts, github emails and discord messages. As far as I can tell and what I remember, we decided to hold off on major API breaking changes at least until we make one "release". But just updating the standard shouldn't break anything?

Yes, we are supposed to release one more Orbiter with DirectX 7 and then we can remove the DX7 parts and cleanup some dirty hacks we have needed to keep the D3D9Client working. After this is done I am still expecting the API to be binary compatible with existing add-ons. So, nothing major is expected to happen. There is no point to turn the API upside-down just in a heck of it. I am no mind-reader but I guess that most developers would appreciate stability regarding the API

from orbiter.

dimitry-ishenko avatar dimitry-ishenko commented on August 17, 2024

As far as I can tell it's NOT been downgraded.

It was with this commit: c4c7be5

It was raised to C++20 without authorization

Not sure what you mean. It was merged by @Xyon whom is an authorized committer as far as I can tell.

The GitHub Build checks didn't fail a week ago, so what changed. Visual Studio 2019 builds/compiles the code without issues, so, the problem seems to be GitHub related.

It's nothing to do with GitHub. As a test, I've switched the standard back to c++20 and it built just fine.

See this: 345483e and the result:

https://github.com/dimitry-ishenko-orbiter/orbiter/actions/runs/6959529860

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

Not sure what you mean. It was merged by @Xyon whom is an authorized committer as far as I can tell.

Yes he/she is and I am not blaming him. When I merge someones pull request I usually try to trust that contributor knows whats he's doing and I don't necessarily look through every line of code in great detail. I have merged some bad pulls in a past and I have spend days to debug and fix them afterwards, so, I am little more careful now on.

Decisions regarding API compatibility, build environment or something that impacts on everybody else's work should be discussed before making them just as a good habit.

from orbiter.

dimitry-ishenko avatar dimitry-ishenko commented on August 17, 2024

Dimitry: I agree and they have been discussed in the forums and on discord. I am sorry you were not there.

Jarmonik: Sorry about that, I just don't have time to be everywhere and follow every discussion in detail. I would prefer receiving a link into a post that would summarize the issue at hand via PM through Orbiter Forum.

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

And to be clear, the reason why I proposed it was because I wanted to replace a lot of Windows-specific formatting code with the standard formatting library, which was added in c++20.

Well, I suppose that wouldn't hurt. What is this windows specific formatting. I searched the code and found nothing else than printf, scanf and std::strstream like formatting.

from orbiter.

n7275 avatar n7275 commented on August 17, 2024

I think specifically std::format. We've encountered some annoying things in NASSP code, where we've come to rely on windows stuff like scanf_s() and not having strncasecmp

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

I think specifically std::format. We've encountered some annoying things in NASSP code, where we've come to rely on windows stuff like scanf_s() and not having strncasecmp

Well... As far as I can tell scanf_s is C++11 stuff not windows specific. https://en.cppreference.com/w/c/io/fscanf

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

If developers want to raise the level to C++20 then I have no reason to hold it back. EDIT: There are also discussion about C++ level over here and C++17 also receives some support. #375

from orbiter.

jarmonik avatar jarmonik commented on August 17, 2024

What did just happen ??? I was replaying to Dimitry's post and it got replaced by my reply. That's odd.

from orbiter.

n7275 avatar n7275 commented on August 17, 2024

What did just happen ??? I was replaying to Dimitry's post and it got replaced by my reply. That's odd.

That's odd. I've had github do things like that in the past though.

Digging into the build errors a bit more:

When I set the standard to CPP+20, I still have this line causing an error:

ifstream ulf(entry);

I checked out the branch https://github.com/TheGondos/orbiter/tree/filesystem which was recently merged on #374 and without changing anything, that branch fails to build.

If I checkout main, and revert acb9135 I get code that builds (ad runs). @TheGondos I think we need your help to get your filesystem branch updated so it can be merged. I'm presuming it was working on your end in July? It looks like a bunch of good changes and standardizations.

I think we need to revert acb9135 temporarily until we can figure out a fix. It's probably something simple. I am happy to make a pull request for this.

from orbiter.

dimitry-ishenko avatar dimitry-ishenko commented on August 17, 2024

And to be clear, the reason why I proposed it was because I wanted to replace a lot of Windows-specific formatting code with the standard formatting library, which was added in c++20.

Well, I suppose that wouldn't hurt. What is this windows specific formatting. I searched the code and found nothing else than printf, scanf and std::strstream like formatting.

Honestly, I don't remember anymore, but in the issue you've linked (#375) I've laid out things I wanted to achieve and my reasoning.

from orbiter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.