ponycc icon indicating copy to clipboard operation
ponycc copied to clipboard

'make` command fails on pass/print/print.pony

Open mpbagot opened this issue 6 years ago • 1 comments

The package fails to build on account of a syntax issue in ponycc/pass/print/print.pony I added the package to my project using stable, then I attempted to build the package to test compatibility with the newest compiler. I am running on Ubuntu 14.04.5, Ponyc version 0.24.3

The exact error message after running make is below.

stable env ponyc --debug -o ponycc/test ponycc/test
Building builtin -> /usr/lib/pony/0.24.3-1/packages/builtin
Building ponycc/test -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test
Building collections -> /usr/lib/pony/0.24.3-1/packages/collections
Building ponytest -> /usr/lib/pony/0.24.3-1/packages/ponytest
Building time -> /usr/lib/pony/0.24.3-1/packages/time
Building files -> /usr/lib/pony/0.24.3-1/packages/files
Building buffered -> /usr/lib/pony/0.24.3-1/packages/buffered
Building term -> /usr/lib/pony/0.24.3-1/packages/term
Building promises -> /usr/lib/pony/0.24.3-1/packages/promises
Building strings -> /usr/lib/pony/0.24.3-1/packages/strings
Building signals -> /usr/lib/pony/0.24.3-1/packages/signals
Building capsicum -> /usr/lib/pony/0.24.3-1/packages/capsicum
Building ../ast -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/ast
Building collections/persistent -> /usr/lib/pony/0.24.3-1/packages/collections/persistent
Building random -> /usr/lib/pony/0.24.3-1/packages/random
Building .. -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc
Building glob -> /usr/lib/pony/0.24.3-1/packages/glob
Building regex -> /usr/lib/pony/0.24.3-1/packages/regex
Building pass -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass
Building frame -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/frame
Building ../unreachable -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/unreachable
Building ../polyfill -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/polyfill
Building ../pass/print -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/print
Building ../pass/parse -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/parse
Building ../pass/syntax -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/syntax
Building ../pass/sugar -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/sugar
Building ../pass/names -> /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/names
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/print/print.pony:80:7: can't reuse name '_show'
  fun _show(g: _Gen, x: UsePackage) =>
      ^
    Info:
    /mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/pass/print/print.pony:65:3: previous use of '_show'
      fun _show(g: _Gen, x: Module) =>
      ^
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test/test_command_type.pony:5:1: can't load package '../pass/print'
use "../pass/print"
^
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test/test_command_type.pony:6:1: can't load package '../pass/parse'
use "../pass/parse"
^
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test/test_command_type.pony:7:1: can't load package '../pass/syntax'
use "../pass/syntax"
^
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test/test_command_type.pony:8:1: can't load package '../pass/sugar'
use "../pass/sugar"
^
Error:
/mnt/files/Documents/GitHub/cmap/.deps/jemc/ponycc/ponycc/test/test_command_type.pony:9:1: can't load package '../pass/names'
use "../pass/names"
^
make: *** [ponycc/test/test] Error 1

I can't see any easy way to solve this, but I'd appreciate some help. If there's anything I can do to help, I'm more than happy to.

Thanks, mpbagot.

mpbagot avatar Aug 01 '18 02:08 mpbagot

the print pass is still using case functions, a feature removed from ponyc in release 0.22.0 .

The _show function needs to be ported to use iftype.

mfelsche avatar Aug 01 '18 12:08 mfelsche