Skip to content

Published LuaRocks module includes wrong source #1

Open

Description

@Nu11u5

The published LuaRocks module at https://luarocks.org/modules/azdle/st specifies the file init.lua in the rockspec, but this file is not present.

Instead, the module includes st.lua, which is not a Lua file, but the HTML source from the GitHub webpage.

The result is that luarocks install st command fails with the error:

cp: cannot stat 'init.lua': No such file or directory
Error: Build error: Failed installing init.lua

Activity

  1. changed the title [-]Published LuaRocks model includes wrong source[/-] [+]Published LuaRocks module includes wrong source[/+] on Jan 9, 2023
  2. dljsjr commented on Jan 11, 2023

    @dljsjr

    This rock is currently just used as a hook for getting dependencies installed, which is mentioned in our README:

    This will be the home of the SmartThings Edge Driver library, but it hasn't been converted to work on anything but our hub yet. This package is currently for getting the same third-party dependencies that we make available to drivers.

    The st rock itself currently doesn't have any Lua code, as mentioned.

  3. Nu11u5 commented on Jan 11, 2023

    @Nu11u5
    Author

    Yes, I am using the rock only to install the dependences, and I'm aware that this module is only a stub.

    The problem is the rock that is published generates an error due to a missing file (it is present in the Git repo, but not the rock file), and instead contains a different .lua file with HTML content. I would think this is not intended.

    This can be easily seen by downloading/extracting the rock file and comparing it to the Git repo.

    st-0.0-1.src.rock/

    st-0.0-1.rockspec
    st.lua             <== Did not come from the Git source repo, seems to be an export of a GitHub webpage HTML
    

    SmartThingsCommunity/st.lua.git/

    LICENSE
    README.md
    init.lua           <== The expected file, required by the rockspec, but not missing in the published module
    st-0.0-1.rockspec
    

    The file init.lua is referenced by the rockspec, but is missing in the published module. Comparing init.lua to st.lua:

    /init.lua

    print("warning: the `st` library on luarocks is currently a stub meant for installing third party dependencies")

    /st.lua

    <!DOCTYPE html>
    <html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark">
      <head>
        <meta charset="utf-8">
      <link rel="dns-prefetch" href="https://github.githubassets.com">
      <link rel="dns-prefetch" href="https://avatars.githubusercontent.com">
      <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
      <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
      <link rel="preconnect" href="https://github.githubassets.com" crossorigin>
      <link rel="preconnect" href="https://avatars.githubusercontent.com">
    
    ...
  4. Nu11u5 commented on Jul 5, 2023

    @Nu11u5
    Author

    @azdle @tpmanley can this issue with the published dependency rock package be fixed?

    • The init.lua file is missing
    • the GitHub project page HTML was somehow published as "st.lua"
  5. lelandblue commented on Jul 6, 2023

    @lelandblue

    Hey @Nu11u5 We will take a look at this. Thank you for your message.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions