Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simnet - can't issue a market buy order (CLI) #1321

Closed
offerm opened this issue Nov 6, 2019 · 4 comments · Fixed by #1326
Assignees
Labels
Projects

Comments

@offerm
Copy link
Contributor

@offerm offerm commented Nov 6, 2019

sell is working

xud@xud1-simnet-exchangeunion-com:~$ xucli sell 0.1 ltc/btc market
swapped 0.1 LTC with peer order c013d160-00e0-11ea-9604-8906d8f43c82

buy is not

xud@xud1-simnet-exchangeunion-com:~$ xucli buy 0.1 ltc/btc market
/opt/xud/node_modules/yargs/yargs.js:1175
      else throw err
           ^
TypeError: utils_1.orderBuilder is not a function
    at Object.exports.builder (/opt/xud/dist/cli/commands/orders/buy.js:6:37)
    at Object.runCommand (/opt/xud/node_modules/yargs/lib/command.js:188:35)
    at Object.parseArgs [as _parseArgs] (/opt/xud/node_modules/yargs/yargs.js:1090:30)
    at Object.get [as argv] (/opt/xud/node_modules/yargs/yargs.js:1024:21)
    at Object.<anonymous> (/opt/xud/bin/xucli:40:3)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
xud@xud1-simnet-exchangeunion-com:~$ 
@offerm offerm added the bug label Nov 6, 2019
@sangaman

This comment has been minimized.

Copy link
Collaborator

@sangaman sangaman commented Nov 7, 2019

Can you try deleting your dist folder, running npm run compile, and then trying again? This looks like an issue with the javascript generated by typescript, and I'd guess that it's not getting fixed automatically because of incremental builds.

@kilrau kilrau added this to To do in 1.0.0-beta via automation Nov 7, 2019
@offerm

This comment has been minimized.

Copy link
Contributor Author

@offerm offerm commented Nov 7, 2019

Yep, solved.

Maybe npm run compile should clean dist ?

@sangaman

This comment has been minimized.

Copy link
Collaborator

@sangaman sangaman commented Nov 7, 2019

Yeah, that was the old behavior until typescript introduced incremental builds, but this is not the first time I've had to manually delete the dist folder and .tsbuildinfo file to resolve an issue, so I'm thinking it may not be reliable enough for our purposes.

I'm thinking maybe of turning off incremental builds for the compile script, so it recreates the dist folder entirely every time it's run, and then having a compile:dev script that can be used for dev purposes to have faster compile times for faster testing and debugging.

@erkarl

This comment has been minimized.

Copy link
Collaborator

@erkarl erkarl commented Nov 7, 2019

I'm thinking maybe of turning off incremental builds for the compile script, so it recreates the dist folder entirely every time it's run, and then having a compile:dev script that can be used for dev purposes to have faster compile times for faster testing and debugging.

I like the idea.

@kilrau kilrau added the P2 label Nov 7, 2019
sangaman added a commit that referenced this issue Nov 7, 2019
This creates a `compile:dev` script that uses incremental builds and
makes the regular `compile` script rebuild the entire `dist` folder
so as to prevent irregularities from incremental builds affecting end
user usage. The `compile:dev` script can be used for reduced build times
for testing and debugging purposes.

Closes #1321.
sangaman added a commit that referenced this issue Nov 8, 2019
This creates a `compile:dev` script that uses incremental builds and
makes the regular `compile` script rebuild the entire `dist` folder
so as to prevent irregularities from incremental builds affecting end
user usage. The `compile:dev` script can be used for reduced build times
for testing and debugging purposes.

Closes #1321.
1.0.0-beta automation moved this from To do to Done Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1.0.0-beta
  
Done
4 participants
You can’t perform that action at this time.