Ceedling icon indicating copy to clipboard operation
Ceedling copied to clipboard

ceedling module:create not working

Open bswiswa opened this issue 7 years ago • 27 comments

Hi, When I run ceedling module:create[a_module] in my project directory, I get the error "no matches found module:create[a_module]"

ceedling version returns: Ceedling:: 0.28.2 CException:: 1.3.1.18 CMock:: 2.4.4.215 Unity:: 2.4.1.120

Running on Mac OS 10.16

Thanks

bswiswa avatar Oct 13 '17 00:10 bswiswa

Um... weird. You typed exactly what you have there? It wasn't a more complicated filename somehow? I can't seem to reproduce this bug.

Maybe if you've done any customizing of the the project file, maybe something there is effecting the situation?

I'm making wild guess right now. Sorry.

mvandervoord avatar Oct 13 '17 10:10 mvandervoord

Thanks for the response. Let me share some screenshots screen shot 2017-10-13 at 3 15 35 pm screen shot 2017-10-13 at 3 15 59 pm screen shot 2017-10-13 at 3 17 29 pm

bswiswa avatar Oct 13 '17 19:10 bswiswa

You're using it correctly... I was hoping you had uncovered a strange corner-case that I could fix, but it appears you're just using it normally and it's not working for you. That doesn't bode well. ;)

The commands that don't use the brackets, like "ceedling help" or "ceedling test:all". These are working normally?

mvandervoord avatar Oct 13 '17 19:10 mvandervoord

Yes those are working just fine! screen shot 2017-10-13 at 3 58 01 pm

bswiswa avatar Oct 13 '17 19:10 bswiswa

I had the same issue, seemed something to do with the shell.

Was using zsh, no problems with bash.

mlepelaars avatar Oct 14 '17 10:10 mlepelaars

This is the solution. After changing my default shell to bash as you suggested it works as expected. Thanks @mlepelaars and @mvandervoord!

bswiswa avatar Oct 14 '17 21:10 bswiswa

Thanks for narrowing it down, guys. I'm reopening this issue because I'd like to see if there is anything I can do about getting it to work with zsh, or at a minimum capturing the requirement in documentation.

mvandervoord avatar Oct 15 '17 13:10 mvandervoord

memo to myself (or anyone else wanting to tackle this thread): users of rake and zsh have to either escape their brackets like module:create[blah] or use single quotes like 'module:create[blah]', neither of which is pretty. Maybe we can make a nicer syntax for this feature in Ceedling?

mvandervoord avatar Nov 02 '17 10:11 mvandervoord

I have a same issue. And I solved it with escape character. Try to this.

$ ceedling module:create\[module_name\]

llHoYall avatar Jun 12 '18 02:06 llHoYall

Automatically escaping square brackets is controlled by the NOMATCH zsh option.

To automatically escape the square brackets, add the following to .zshrc:

# Escape square brackets by default
unsetopt nomatch

adamtilton avatar Nov 20 '18 19:11 adamtilton

This command is not working with ceedling V0.31.1 on a windows10 PC. It also doesn't work with escapes. ceedling_module_create_notworking

SilverBulletEngineering avatar Feb 25 '22 06:02 SilverBulletEngineering

Just to verify, when you made this attempt, were you in a folder which contained a Ceedling project? (meaning it already has a project.yml file configured and running in that folder?

mvandervoord avatar Feb 25 '22 11:02 mvandervoord

I was trying this command in a temp directory without a yml file just to see if it worked properly. When in a directory with a yml file, the command worked. But the test_ file code that is created has #ifdef TEST. A different flag name is used in the projects I'm working in, so it would be preferable if ceedling generated the flagname that is specific to the project. There is no yml file entry for the name of the test flag, other than the -D define that defines it to only to the build system. Since this flag is important to the project, an entry for the definition of the test flag in the yml file would solve this issue. Also #ifdef is not used in the project, #if is used. #if FLAGNAME tests to see if the flag is enabled. The flag is set with #define FLAGNAME 1, or passed in on the command line -DFLAGNAME 1. So an entry in the yml file for the the flag assignment option would also solve that issue. Many coding standards require #if instead of #ifdef for many good reasons. Here is one link, but there are many links with data to support usage of #if over #ifdef (yes some people in this post are arguing for the old timer's way - lol): https://stackoverflow.com/questions/135069/ifdef-vs-if-which-is-better-safer-as-a-method-for-enabling-disabling-compila

SilverBulletEngineering avatar Feb 25 '22 15:02 SilverBulletEngineering

Hi @SilverBulletEngineering -- We've considered switching the default to #if before, but realized that this was a later edition to the C language and have stuck with using #ifdef for better compatibility. To address the root issue you bring up, you can define your own templates for module:create to use, so we've (thus far) not had much in the way of specializing details. This isn't to say it isn't a good idea. I think it is. Could you open a separate issue for that, since it's not the focus of this issue? Thanks!

mvandervoord avatar Feb 25 '22 16:02 mvandervoord

$ ceedling help
Welcome to Ceedling!
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Commands:
  ceedling example PROJ_NAME [DEST]  # new specified example project (in DEST...
  ceedling examples                  # list available example projects
  ceedling help [COMMAND]            # Describe available commands or one spe...
  ceedling new PROJECT_NAME          # create a new ceedling project
  ceedling upgrade PROJECT_NAME      # upgrade ceedling for a project (not re...
  ceedling version                   # return the version of the tools installed`

I came across problem like above the output. I followed setup instructions ceedling guide. First of all, I installed rubby. And then, i runned the command gem install ceedling on windows system. I didn't find full ceedling commands. For example: ceedling module:create[filename] command runned on the bash and returned Could not find command "module:create[example]".

Detail ceedling version:

Welcome to Ceedling! Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead. Ceedling:: 0.31.1 CMock:: 2.5.4 Unity:: 2.5.4 CException:: 1.3.3

Do you have any idea about this problem?

Thanks!

Emre-ee avatar Nov 03 '22 13:11 Emre-ee

Hi @Emre-ee -- Thanks for the heads up. This warning won't get in the way of doing your normal work, but it's helpful for us to improve Ceedling going forward. It appears new versions of Ruby are about to break something in our dependency chain. Can you do me a favor? Can you post the results of these two lines here?

ruby --version
gem list

Thanks so much!

mvandervoord avatar Nov 03 '22 13:11 mvandervoord

Thank you for replying message. I checked ruby version and gem list.

C:\Windows\System32>ruby --version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]

C:\Windows\System32>gem list

*** LOCAL GEMS ***

abbrev (default: 0.1.0)
base64 (default: 0.1.1)
benchmark (default: 0.2.0)
bigdecimal (default: 3.1.1)
bundler (default: 2.3.7)
ceedling (0.31.1)
cgi (default: 0.3.1)
constructor (2.0.0)
csv (default: 3.2.2)
date (default: 3.2.2)
debug (1.4.0)
deep_merge (1.2.2)
delegate (default: 0.2.0)
did_you_mean (default: 1.6.1)
digest (default: 3.1.0)
drb (default: 2.1.0)
english (default: 0.7.1)
erb (default: 2.2.3)
error_highlight (default: 0.3.0)
etc (default: 1.3.0)
fcntl (default: 1.0.1)
fiddle (default: 1.1.0)
fileutils (default: 1.6.0)
find (default: 0.1.1)
forwardable (default: 1.3.2)
getoptlong (default: 0.1.1)
io-console (default: 0.5.11)
io-nonblock (default: 0.1.0)
io-wait (default: 0.2.1)
ipaddr (default: 1.2.4)
irb (default: 1.4.1)
json (default: 2.6.1)
logger (default: 1.5.0)
matrix (0.4.2)
minitest (5.15.0)
mutex_m (default: 0.1.1)
net-ftp (0.1.3)
net-http (default: 0.2.0)
net-imap (0.2.3)
net-pop (0.1.1)
net-protocol (default: 0.1.2)
net-smtp (0.3.1)
nkf (default: 0.1.1)
observer (default: 0.1.1)
open-uri (default: 0.2.0)
open3 (default: 0.1.1)
openssl (default: 3.0.0)
optparse (default: 0.2.0)
ostruct (default: 0.5.2)
pathname (default: 0.2.0)
power_assert (2.0.1)
pp (default: 0.3.0)
prettyprint (default: 0.1.1)
prime (0.1.2)
pstore (default: 0.1.1)
psych (default: 4.0.3)
racc (default: 1.6.0)
rake (13.0.6)
rbs (2.1.0)
rdoc (default: 6.4.0)
readline (default: 0.0.3)
reline (default: 0.3.0)
resolv (default: 0.2.1)
resolv-replace (default: 0.1.0)
rexml (3.2.5)
rinda (default: 0.1.1)
rss (0.2.9)
ruby2_keywords (default: 0.0.5)
securerandom (default: 0.1.1)
set (default: 1.0.2)
shellwords (default: 0.1.0)
singleton (default: 0.1.1)
stringio (default: 3.0.1)
strscan (default: 3.0.1)
tempfile (default: 0.1.2)
test-unit (3.5.3)
thor (0.20.3)
time (default: 0.2.0)
timeout (default: 0.2.0)
tmpdir (default: 0.1.2)
tsort (default: 0.1.0)
typeprof (0.21.2)
un (default: 0.2.0)
uri (default: 0.11.0)
weakref (default: 0.1.1)
win32ole (default: 1.8.8)
yaml (default: 0.2.0)
zlib (default: 2.1.1)

Thanks!

Emre-ee avatar Nov 03 '22 17:11 Emre-ee

@mvandervoord The DidYouMean::SPELL_CHECKERS.merge deprecation warning is due to thor (https://github.com/rails/thor/issues/763) - this has been fixed and was released in 1.2.0. Ceedling's current version pin doesn't allow for this version to be installed.

davidjb avatar Jan 11 '23 06:01 davidjb

Hello, I installed ruby 3.1.4 and ceedling 0.31.1. I only see few below commands. Any suggestions?

Welcome to Ceedling! Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call DidYouMean.correct_error(error_name, spell_checker)' instead. Commands: ceedling example PROJ_NAME [DEST] # new specified example project (in DEST... ceedling examples # list available example projects ceedling help [COMMAND] # Describe available commands or one spe... ceedling new PROJECT_NAME # create a new ceedling project ceedling upgrade PROJECT_NAME # upgrade ceedling for a project (not re... ceedling version # return the version of the tools installed

ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x64-mingw-ucrt]

***** LOCAL GEMS ***

abbrev (default: 0.1.0) base64 (default: 0.1.1) benchmark (default: 0.2.0) bigdecimal (default: 3.1.1) bundler (default: 2.3.26) ceedling (0.31.1) cgi (default: 0.3.6) constructor (2.0.0) csv (default: 3.2.5) date (default: 3.2.2) debug (1.6.3) deep_merge (1.2.2) delegate (default: 0.2.0) did_you_mean (default: 1.6.1) digest (default: 3.1.0) drb (default: 2.1.0) english (default: 0.7.1) erb (default: 2.2.3) error_highlight (default: 0.3.0) etc (default: 1.3.0) fcntl (default: 1.0.1) fiddle (default: 1.1.0) fileutils (default: 1.6.0) find (default: 0.1.1) forwardable (default: 1.3.2) getoptlong (default: 0.1.1) io-console (default: 0.5.11) io-nonblock (default: 0.1.0) io-wait (default: 0.2.1) ipaddr (default: 1.2.4) irb (default: 1.4.1) json (default: 2.6.1) logger (default: 1.5.0) matrix (0.4.2) minitest (5.15.0) mutex_m (default: 0.1.1) net-ftp (0.1.3) net-http (default: 0.3.0) net-imap (0.2.3) net-pop (0.1.1) net-protocol (default: 0.1.2) net-smtp (0.3.1) nkf (default: 0.1.1) observer (default: 0.1.1) open-uri (default: 0.2.0) open3 (default: 0.1.1) openssl (default: 3.0.1) optparse (default: 0.2.0) ostruct (default: 0.5.2) pathname (default: 0.2.0) power_assert (2.0.1) pp (default: 0.3.0) prettyprint (default: 0.1.1) prime (0.1.2) pstore (default: 0.1.1) psych (default: 4.0.4) racc (default: 1.6.0) rake (13.0.6) rbs (2.7.0) rdoc (default: 6.4.0) readline (default: 0.0.3) reline (default: 0.3.1) resolv (default: 0.2.1) resolv-replace (default: 0.1.0) rexml (3.2.5) rinda (default: 0.1.1) rss (0.2.9) ruby2_keywords (default: 0.0.5) securerandom (default: 0.2.0) set (default: 1.0.2) shellwords (default: 0.1.0) singleton (default: 0.1.1) stringio (default: 3.0.1) strscan (default: 3.0.1) tempfile (default: 0.1.2) test-unit (3.5.3) thor (1.2.2, 0.20.3) time (default: 0.2.2) timeout (default: 0.2.0) tmpdir (default: 0.1.2) tsort (default: 0.1.0) typeprof (0.21.3) un (default: 0.2.0) uri (default: 0.12.1) weakref (default: 0.1.1) win32ole (default: 1.8.8) yaml (default: 0.2.0) zlib (default: 2.1.1)**

HdAd90 avatar May 23 '23 16:05 HdAd90

and what do you expect to see?

Letme avatar May 23 '23 16:05 Letme

image Isn't this expected? I cannot create module

HdAd90 avatar May 23 '23 16:05 HdAd90

that help tells you to run: ceedling module:create[bla]

And that creates the module (I am trying on 0.32.0 but with ruby 3.2):

$ ceedling module:create[bla]
File src/bla.c created
File src/bla.h created
File test/test_bla.c created
Generate Complete

So what do you get?

Letme avatar May 23 '23 17:05 Letme

image No command found

HdAd90 avatar May 23 '23 17:05 HdAd90

I have a feeling this is a shell problem described here, so try escaping some of the brackets...

Letme avatar May 23 '23 17:05 Letme

image I installed 0.32.0 with ruby 3.1.4. I get above error. By brackets you mean which brackets?[bla]?

HdAd90 avatar May 23 '23 17:05 HdAd90

Also, When I create a new project...I don't see vendor folder in there only src, test and project.yml file is being created. Would that be an issue?

HdAd90 avatar May 23 '23 17:05 HdAd90

I think I got it working .... nevermind

HdAd90 avatar May 23 '23 17:05 HdAd90