Comments (4)
Yeah, that is why I didn't include a Gemfile: these gems break all the time.
I'm not sure what I can do about this issue, other than omitting these examples when their dependencies are not met.
from gosu-examples.
Oh I can see that.
I'm curious though as this is the example "showcase" for the examples.
Just making a suggestion here but..
Wouldn't it be benefitial to have a pure ruby only gosu - only - examples project. if this is to advocate the usage of gosu it would be neat to see a functional one not using external gems.
And then maybe a gosu-advanced-examples would be more of a "extras included" examples bundle where you would implement such (namely this gosu-examples project)
This would effectively allow you to make a Gemfile with ruby and gosu version locked to a stabile release.
Only in the advanced examples project locked to a stable ruby and gosu release that works in accordance with the additional gems, but with a disclaimer saying those gems are third party and might cause conflicts and such if not adhering to the recommended stabile versions of ruby and gosu.
from gosu-examples.
Hmmm, to be honest I'm not a fan of this idea. It adds more overhead, and I don't want to fragment a niche project like gosu-examples
any further.
A Gemfile would not help users who gem install gosu-examples
, except if the gem dependencies were locked to very specific versions. All we really need for pure-Ruby examples is a recent-enough version of Gosu, and the gemspec lets us do this.
And people who download/git-clone the pure-Ruby repository shouldn't have to change their Ruby version to whatever I last pinned in .ruby-version
. A Gemfile (without .lock) would let us specify a minimum version of Gosu, but I'm not sure if that alone is worth the extra steps.
The problem with the third-party gems is that I don't think it's viable to create a complex set of rules about Ruby versions, gem versions, and operating systems on which all three gems (OpenGL, Chipmunk, RMagick) will work. And even if that's possible, someone who wants to see the Chipmunk example shouldn't have to jump through the hoops necessary to install the RMagick gem.
The only solution I can think of is to have better error reporting when external gems cannot be loaded. Or we could drop integration examples with fragile libraries altogether. But since Ruby lets us gracefully ignore LoadErrors, why throw code away 🤷♂️
Closing this for now. I want to update the UI of gosu-examples some time after the Gosu 1.0 release (so, anytime from next month to 2021... :D). I'll try to improve the error messages when I get to this.
from gosu-examples.
A Gemfile would not help users who gem install gosu-examples, except if the gem dependencies were locked to very specific versions. All we really need for pure-Ruby examples is a recent-enough version of Gosu, and the gemspec lets us do this.
What you're saying here is exactly what i was pointing out :)
the fragmentation was to separate the two, and pure projects have a recommended ruby version to pin a stable one. that was my only point. the separation of a more advanced one was a suggestion if one wanted to keep the third party unstable packages that cause issues.
from gosu-examples.
Related Issues (11)
- LICENSE needs clarification re: content
- When not properly exiting editable box in text_input.rb - arrow movement to the sides fails HOT 1
- Deprecation warning HOT 2
- Update gem HOT 1
- Windows Install: fork() function is unimplemented on this machine (NotImplementedError) HOT 1
- Current game is not being highlighted on Windows HOT 1
- Showing the source code is broken in Windows
- Explain Gosu::LICENSES in a short little example HOT 1
- Support new fullscreen shortcuts in Gosu 0.11.1 HOT 1
- Window is not centered because of dynamic resizing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gosu-examples.