Ceedling
Ceedling copied to clipboard
Fresh install of Ruby 3.2.1 and Ceedling 0.31.1 on Windows 10 fails with weird error.
I installed msys64, and in msys64 installed ruby. I updated to the latest version of gem, then installed ceedling. Once I corrected a PATH issue, I experienced, in sequence:
- There was a cheery deprecation warning on each invocation of ceedling related to the "did you mean" system.
- After the two-line fix in the Thor gem, I got rid of that only to be faced with File.exists? (and later Dir.exists?) errors any time I tried to use ceedling for anything.
- Fixing those (in a surprisingly large number of spaces) led to a final problem I have no idea how to fix. I generated an example project with
ceedling example
,cd
ed to the generated directory, and got this:
$ ./ceedling
/usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:432:in `visit_Psych_Nodes_Alias': Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`. (Psych::AliasesNotEnabled)
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `block in register_empty'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `each'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:340:in `register_empty'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:148:in `visit_Psych_Nodes_Sequence'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:347:in `block in revive_hash'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each_slice'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `revive_hash'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:169:in `visit_Psych_Nodes_Mapping'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:347:in `block in revive_hash'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `each_slice'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:345:in `revive_hash'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:169:in `visit_Psych_Nodes_Mapping'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:320:in `visit_Psych_Nodes_Document'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in `visit'
from /usr/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in `accept'
from /usr/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in `accept'
from /usr/lib/ruby/3.2.0/psych.rb:334:in `safe_load'
from /usr/lib/ruby/3.2.0/psych.rb:369:in `load'
from /usr/lib/ruby/3.2.0/psych.rb:671:in `block in load_file'
from /usr/lib/ruby/3.2.0/psych.rb:670:in `open'
from /usr/lib/ruby/3.2.0/psych.rb:670:in `load_file'
from vendor/ceedling/bin/ceedling:278:in `<main>'
All the usual stuff to help figure out the problem:
-
uname -a
→ MINGW64_NT-10.0-19045 DESKTOP-HJV57MC 3.4.6.x86_64 2023-02-15 18:03 UTC x86_64 Msys - msys installation → msys2-x86_64-20221028.exe
-
ruby --version
→ ruby 3.2.1 (2023-02-08 revision 31819e82c8) [x86_64-cygwin] -
ceedling version
→ Ceedling:: 0.31.1 CMock:: 2.5.4 Unity:: 2.5.4 CException:: 1.3.3
Is there a known-good pairing of Ruby version and Ceedling version so I can continue evaluating the suite?
Ruby 3.2 is not supported yet: #739
I suggest you either test ceedling 0.32 or you downgrade ruby to 3.1
Ah. Thanks.
I'll do the downgrade. It's not fair to evaluate a package based on a pre-release.
I'm kind of shocked that in a point release there's major, breaking API changes in Ruby, mind. That's ... serious cringe!
Hello, I am facing the same problem with Ruby 3.2.2 and Ceddling 0.31.1 on Windows. I see 0.32.0 in PR. Can you provide me some steps to upgrade to 0.32.0? I downloaded, the Git repo for ceedling master, but was unable to upgrade to 0.32.0 gem.
There are published released gems (for that 0.32.0 version as pre-release https://github.com/ThrowTheSwitch/Ceedling/releases/tag/0.32.0-772f5f4) under Code/Releases (https://github.com/ThrowTheSwitch/Ceedling/releases) which you download and then simply use gem install filename.gem
to install.
Ok thanks, I installed the 0.32.0 ceedling. But now it's giving me the above error, any idea why that would be?
Is project directory already existing? I havent run that command for a long time.
No, I want to create a new project. What should be the command if the project would have already exists?
you are creating a new project named project
which would create a directory project at your current location. So you are either missing that directory and Ceedling has trouble creating it, or you have the directory and ceedling doesn't want to overwrite it.
To update the project, that pull request says try: ceedling upgrade <dirname>
(which means you execute ceedling command outside of your project - or maybe use .
as <dirname>
)
There is no "project" directory in current location.
Moreover, if I create a dummy folder "project" and execute that command, it still gives the same error. Do I need to have source control inside my current project? Wouldn't ceedling execute under my local copy?
I think that branch needs a fix as it is using invalid method to open a directory (it opens it as file). At least that's what Googling about the issue gives me.
I see
How about you make project
directory?
I did create empty project directory. Same result.
OK, that is then the issue in that pre-release. I glanced over a code and could not find where root project directory is created (that is why i thought making a project
directory and then running ceedling new project
from its parent would solve the problem), but the core issue is that file read assumes a file, but gets a directory.
Which versions you would recommend me to start using ceedling with ruby? Please let me know ruby version and ceedling version.
Latest Ceedling 0.31.1 is supported by ruby 3.1 versions.
I installed ruby 3.1.4 and ceedling 0.32.0, looks like it is working now. Thanks for all your help.
0.32.0 is still a pre-release and as you can see from the pull request it still has some issues. The 0.31.1 is the last release. Just as a side note.
If I install 0.31.1 with 3.1.4 ruby version then I get above error in snapshot. Will this cause any issues? new project "Fun" gets created though.
It doesnt say its an error, its just a deprecation warning.