Comments (22)
@LefterisJP @paulperegud you need to wait for MELPA to catch up on the changes. It usually takes less than 5 hours.
To force spacemacs to recompile it's configuration use "SPC f e d" to go to .spacemacs file, "SPC f s" to save it, "SPC f e R" to run configuration update process.
That's not a re-compile, that's a reload. Recompile is something different, and has to do with elc
files. To install the new version of the package (once it's available from MELPA), you need to either delete the solidity-mode
directory inside ~/.emacs.d/elpa/
, or use the "Update Packages" button in Spacemacs home buffer.
from emacs-solidity.
This is the right place to ask. Can you do M-x toggle-debug-on-error
and then reproduce the problem and copy the call trace in the issue?
from emacs-solidity.
Debugger entered--Lisp error: (void-function solidity-mode)
solidity-mode()
set-auto-mode-0(solidity-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(# "/eth/dapp-bin/clientreceipt/clientreceipt.sol" nil nil "/eth/dapp-bin/cl$
find-file-noselect("/Users/tmb/eth/dapp-bin/clientreceipt/clientreceipt.sol" nil nil nil)
find-file("/Users/tmb/eth/dapp-bin/clientreceipt/clientreceipt.sol")
find-file-existing("/Users/tmb/eth/dapp-bin/clientreceipt/clientreceipt.sol")
from emacs-solidity.
I have the same error. Some ideas? I use emacs 24.5.1
Thanks!
from emacs-solidity.
Same problem here. Any idea?
from emacs-solidity.
I will have a look tomorrow. Will keep you guys up to date. Installing from el-get works since I use it from there but perhaps there is an issue with Melpa.
I will fix it as soon as I can reproduce it.
from emacs-solidity.
How did you try to install the package?
Did you require the package somewhere in your emacs configuration?
(require 'solidity-mode)
from emacs-solidity.
Actually now it seems to be working. But still I get some warnings during installation:
These are the steps I follow:
- Start emacs, then M-x package-list
- Search for solidity-mode (currently the version is 2016.04.26)
- Mark to install it and click install
I get the following warnings on the emacs console:
file /home/santi/.emacs.d/elpa/solidity-mode-20160426.31/solidity-mode-autoloads.el at Thu May 5 09:22:46 2016
Entering directory/home/santi/.emacs.d/elpa/solidity-mode-20160426.31/' Compiling file /home/santi/.emacs.d/elpa/solidity-mode-20160426.31/solidity-mode-pkg.el at Thu May 5 09:22:46 2016 Compiling file /home/santi/.emacs.d/elpa/solidity-mode-20160426.31/solidity-mode.el at Thu May 5 09:22:46 2016 solidity-mode.el:383:1:Warning:
"/usr/bin/solc"' is a malformed function
solidity-mode.el:383:1:Warning:(error line-start (file-name) ":" line ":" column ":" " Error: " (message))' is a malformed function solidity-mode.el:386:28:Warning: reference to free variable
solidity'
solidity-mode.el:388:31:Warning: reference to free variablesource-inplace' solidity-mode.el:391:12:Warning: reference to free variable
solidity-mode'
solidity-mode.el:393:17:Warning: reference to free variable
flycheck-checkers' solidity-mode.el:393:17:Warning: assignment to free variable
flycheck-checkers'
solidity-mode.el:395:30:Warning: assignment to free variable
`flycheck-solidity-executable'In end of data:
solidity-mode.el:399:1:Warning: the function `flycheck-define-checker' is not
known to be defined.
I have solidity compiler installed:
$> /usr/bin/solc --version
solc, the solidity compiler commandline interface
Version: 0.3.2-81ae2a78/Release-Linux/g++/JIT
After adding the (required 'solidity-mode) to my .emacs I see the syntax and seems to be working now. However I am not sure if the warnings during install are intended to be there.
Kind regards,
Santiago
from emacs-solidity.
Thank you for the very detailed report @santiagorp.
I also get some of these warnings, they are harmless.
I am going to push some fixes for some of them soon.
from emacs-solidity.
Fixed some of the warnings. Will see if I can handle the rest at some point later, but they are mainly harmless.
As for the original issue this should be fixed so I am closing this now. Please open additional issues for any further problems.
from emacs-solidity.
By @bmag at https://gitter.im/syl20bnr/spacemacs
I found the problem. solidity-mode does not define an autoload for its major-mode (see here), so you need to require it in user-config
see here for a proper autoloaded major-mode. I'd suggest reporting the missing autoload as a bug
from emacs-solidity.
@paulperegud Thank you Paul. I will use his examples and try to provide a fix. PRs are always welcome!
The problem is I don't see this as a problem with my configuration so I would have to copy someone else's configuration to experience the issue.
from emacs-solidity.
@paulperegud I added the magic autoload comment as defined in the emacs wiki.
Can you check if your configuration is working better now?
from emacs-solidity.
No, it does not fix loading. I've tried adding this line myself, to no avail.
Since you've asked for my env, here it is.
$ emacs --version
GNU Emacs 24.5.1
And .spacemacs to replicate the issue:
https://gist.github.com/paulperegud/9302694f388410071ae31cecccefc7f9
Note: this is a autogenerated .spacemacs with two extra lines marked with ";; PP:" comment
Installation steps:
- git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
- download ~/.spacemacs from gist above
- run emacs (when asked I choose "evil flagship" / "standard distribution" but I don't think the choice is relevant to this bug)
from emacs-solidity.
To force spacemacs to recompile it's configuration use "SPC f e d" to go to .spacemacs file, "SPC f s" to save it, "SPC f e R" to run configuration update process.
from emacs-solidity.
I am using Spacemacs and Emacs v 25
I was receiving this error message (see Issue 8)
Compiling file /home/victor/.emacs.d/elpa/solidity-mode-20160426.31/solidity-mode.el at Fri Apr 29 13:21:06 2016
solidity-mode.el:383:1:Warning: `"/usr/bin/solc"' is a malformed function
solidity-mode.el:383:1:Warning: `(error line-start (file-name) ":" line ":"
column ":" " Error: " (message))' is a malformed function
solidity-mode.el:386:28:Warning: reference to free variable `solidity'
solidity-mode.el:388:31:Warning: reference to free variable `source-inplace'
solidity-mode.el:391:12:Warning: reference to free variable `solidity-mode'
solidity-mode.el:393:17:Warning: reference to free variable
`flycheck-checkers'
solidity-mode.el:393:17:Warning: assignment to free variable
`flycheck-checkers'
solidity-mode.el:395:30:Warning: assignment to free variable
`flycheck-solidity-executable'
I commented out the following and it works fine, but I guess I don't have flycheck:
;;; --- interface with flycheck if existing ---
(when (require 'flycheck nil 'noerror)
;; add dummy source-inplace definition to avoid errors
(defvar source-inplace)
;; add a solidity mode callback to set the executable of solc for flycheck
;; define solidity's flycheck syntax checker
(flycheck-define-checker solidity-checker
"A Solidity syntax checker using the solc compiler"
:command ("/usr/bin/solc" source-inplace)
:error-patterns
((error line-start (file-name) ":" line ":" column ":" " Error: " (message)))
:modes solidity-mode
:predicate (lambda () (eq major-mode 'solidity-mode)))
(add-to-list 'flycheck-checkers 'solidity-checker)
(add-hook 'solidity-mode-hook
(lambda () (setq flycheck-solidity-executable solidity-solc-path))))
from emacs-solidity.
@tbrooke That appears to be a different issue. Can you make a new issue and paste what you wrote there?
from emacs-solidity.
@bmag @paulperegud Great to hear. I am not familiar with spacemacs, I ofcourse know of Melpa but use el-get
myself.
If the loading issue is resolved for all of you then please tell me and I will close the issue. If not I will play with spacemacs to see what is wrong.
from emacs-solidity.
I did "/usr/bin/solc"' is a malformed function #8 But I guess I wasn't clear so I reposted it
from emacs-solidity.
@paulperegud @bmag Both in normal emacs melpa and in spacemacs with the configuration you provided solidity mode seems to be auto-loaded fine right now.
Only at spacemacs there seems to be the issue @tbrooke reported though, but I will address this in the other issue.
If it's okay with you @paulperegud and you can confirm it's fine now I will close the ticket.
from emacs-solidity.
@LefterisJP problem is fixed, confirming!
from emacs-solidity.
Thanks Paul!
from emacs-solidity.
Related Issues (20)
- swiper/solidity-mode incompatibility HOT 5
- Does not work HOT 5
- parent mode is c-mode in `define-derived-mode` HOT 2
- Indentation After Structs HOT 5
- Unable to make `solidity-flycheck-solc` work HOT 26
- Create a test suite
- Flycheck Gets Stuck at Import HOT 7
- solc `--old-reporter` flag removed in solc 0.8.0 HOT 1
- change indent in solidity mode HOT 2
- el-get-install can't install the package, Ubuntu 20.04 HOT 1
- melpa instruction needs more details
- Gracefully indenting structs and assembly blocks. HOT 14
- solidity-flycheck requires el package to be included in source, otherwise does not work HOT 3
- Constructor body idents too many levels HOT 1
- Keywords inside a string always bolded and colored HOT 2
- [request] lsp mode support HOT 7
- [request] Port Consensys' vscode solidity auditor plugin
- Does this work in Windows
- `remove-if-not` function definition is void
- Default indentation doesn't look right to me HOT 1
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 emacs-solidity.