assemblyscript icon indicating copy to clipboard operation
assemblyscript copied to clipboard

Transform glob entries into paths

Open jerrygreen opened this issue 3 years ago • 3 comments

  • fix https://github.com/AssemblyScript/assemblyscript/issues/1712

  • [x] I've read the contributing guidelines

jerrygreen avatar Mar 06 '21 15:03 jerrygreen

@dcodeIO can you tell me what is this LIBRARY_PREFIX.valueOf() and why LIBRARY_PREFIX might be undefined that is making a test fail? I don't quite understand this...

 /home/runner/work/assemblyscript/assemblyscript/cli/asc.js:175
exports.libraryPrefix = __getString(assemblyscript.LIBRARY_PREFIX.valueOf());
                                                                  ^
TypeError: Cannot read property 'valueOf' of undefined

But anyway this asconfig.json actually works now:

{
  "entries": ["./src/**/*.as.ts"]
}

jerrygreen avatar Mar 06 '21 16:03 jerrygreen

LIBRARY_PREFIX can be an exported WebAssembly global, and the proper way to get its value is to use valueOf, which is specified to return the primitive value of an object, so also works on strings. Not sure why it would fail.

dcodeIO avatar Mar 06 '21 16:03 dcodeIO

Ok, I don't know either, but I can say compiler actually works. I temporarily use my fork in my project like this:

// package.json
{
  "devDependencies": {
    "assemblyscript": "https://github.com/jerrygreen/assemblyscript/tarball/jerrygreen",
  }
}

Which accumulates both this change and also: https://github.com/AssemblyScript/assemblyscript/pull/1705. And I'm ok with it currently. Maybe I'll figure out what's wrong with this change later. Or not. Will see :)

jerrygreen avatar Mar 06 '21 16:03 jerrygreen

This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!

github-actions[bot] avatar Dec 03 '23 23:12 github-actions[bot]

This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.

github-actions[bot] avatar Dec 11 '23 23:12 github-actions[bot]