Skip to content

Installation instructions #6

Open

Description

@glor

I had some difficulties with the installation instructions:
getting started is missing the information about setting WHILEYHOME

Compiling does not work from ./examples:

$ wy compile hello_world.whiley
Exception in thread "main" java.lang.IllegalArgumentException: unable to find build configuration ("wy.toml")
	at wycc.WyMain.determineLocalRootAndProject(WyMain.java:230)
	at wycc.WyMain.main(WyMain.java:128)

Compiling does not work from wdk-root:

$ wy compile examples/hello_world.whiley
Exception in thread "main" java.lang.IllegalArgumentException: invalid key access: plugins/wyc
	at wycc.cfg.Configuration$1.get(Configuration.java:143)
	at wycc.cfg.ConfigurationCombinator.get(ConfigurationCombinator.java:73)
	at wycc.util.AbstractPluginEnvironment.activateDefaultPlugins(AbstractPluginEnvironment.java:102)
	at wycc.util.AbstractPluginEnvironment.<init>(AbstractPluginEnvironment.java:39)
	at wycc.util.AbstractWorkspace.<init>(AbstractWorkspace.java:174)
	at wycc.WyMain.<init>(WyMain.java:101)
	at wycc.WyMain.main(WyMain.java:142)

Am I doing something wrong? Could the instuctions be updated?

Activity

  1. DavePearce commented on Sep 17, 2020

    @DavePearce
    Member

    Hey,

    Yes, the instructions are quite out-of-date I think, sorry. The challenge actually is that you cannot compile individual files any longer. Instead, you have to create a wy.toml file and then call wy build. As an example, trying cloning this repository:

    https://github.com/DavePearce/Conway.wy

    In the root directory of this repository (i.e. where the wy.toml file is), run wy build or wy --verbose build. This should then produce JavaScript files in the public/js directory. You can even point your webbrowser to the file public/index.html and you should be able to run the game!

    I will then update the instructions in the near future.

  2. self-assigned this
    on Sep 17, 2020
  3. glor commented on Sep 28, 2020

    @glor
    Author

    Thanks, that helps a little. But how do I compile to jvm and run it from command line?

  4. DavePearce commented on Oct 1, 2020

    @DavePearce
    Member

    So, at the moment, the JVM backend is "out of action" as it needs to be updated to reflect the latest changes in the Whiley compiler. Unfortunately, this means the only working backend is for JavaScript at this stage. I will make the fixes in the not-to-distant future.

  5. astroC86 commented on Jan 27, 2022

    @astroC86

    Hey,

    Yes, the instructions are quite out-of-date I think, sorry. The challenge actually is that you cannot compile individual files any longer. Instead, you have to create a wy.toml file and then call wy build. As an example, trying cloning this repository:

    https://github.com/DavePearce/Conway.wy

    In the root directory of this repository (i.e. where the wy.toml file is), run wy build or wy --verbose build. This should then produce JavaScript files in the public/js directory. You can even point your webbrowser to the file public/index.html and you should be able to run the game!

    I will then update the instructions in the near future.

    Not sure what the issue is, tried doing that but i got this?

    Downloaded https://github.com/Whiley/Repository/raw/master/index.txt ................ [0ms]
    Internal failure: invalid entry compressed size (expected 26892 but got 26548 bytes)
    java.util.zip.ZipException: invalid entry compressed size (expected 26892 but got 26548 bytes)
            at java.base/java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:405)
            at java.base/java.util.zip.ZipInputStream.read(ZipInputStream.java:199)
            at wyfs.util.ZipFile.readEntryContents(ZipFile.java:118)
            at wyfs.util.ZipFile.<init>(ZipFile.java:93)
            at wyfs.util.ZipFile$1.read(ZipFile.java:48)
            at wyfs.util.ZipFile$1.read(ZipFile.java:39)
            at wyfs.util.AbstractEntry.read(AbstractEntry.java:79)
            at wyfs.util.ZipFileRoot.refresh(ZipFileRoot.java:59)
            at wyfs.util.ZipFileRoot.<init>(ZipFileRoot.java:43)
            at wycli.util.LocalPackageRepository.get(LocalPackageRepository.java:104)
            at wycli.util.RemotePackageRepository.get(RemotePackageRepository.java:120)
            at wycli.util.StdPackageResolver.process(StdPackageResolver.java:77)
            at wycli.util.StdPackageResolver.resolve(StdPackageResolver.java:60)
            at wycli.util.AbstractWorkspace$AbstractProject.resolve(AbstractWorkspace.java:284)
            at wycli.util.AbstractWorkspace$AbstractProject.initialise(AbstractWorkspace.java:267)
            at wycli.util.AbstractWorkspace$AbstractProject.access$000(AbstractWorkspace.java:234)
            at wycli.util.AbstractWorkspace.open(AbstractWorkspace.java:206)
            at wycli.WyMain.main(WyMain.java:159)
    

    I am on whiley version 0.5.3, linux environment

  6. DavePearce commented on Jan 27, 2022

    @DavePearce
    Member

    Hey @astroC86,

    Hmmm, that's interesting. It means it has incorrectly downloaded a dependency. Not sure exactly how that could happen! What is your wy.toml file ?

    In other news, I'm reworking the instructions as the main installation mechanism now will be through cargo. You can see my very rough new-look website here:

    https://whiley.github.io/WhileyOrg/

    In particular, the install page gives a very brief overview of how to get it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions