deno_registry2 icon indicating copy to clipboard operation
deno_registry2 copied to clipboard

deno_registry2 must reject broken module

Open elycheikhsmail opened this issue 2 years ago • 6 comments

I think deno registry must check the module befor add them to deno.land/x store, if the code is invalid (like deno deploy check) or have'nt description inform the contributor. this will be help develop to get "save" code from deno.land/x, this may need some convention about enty/entries poins for modules or manifest.

elycheikhsmail avatar Jul 28 '21 21:07 elycheikhsmail

We already have process that goes through every file to deno cache them to analyze the dependencies (which is then reflected on the build status returned by the webhook) -- is that what you had in mind?

wperron avatar Jul 29 '21 13:07 wperron

We already have process that goes through every file to deno cache them to analyze the dependencies (which is then reflected on the build status returned by the webhook) -- is that what you had in mind?

I deploy test_manager, I clean (not intended) one file content commit this brok my code, then I publish can't be used by any body because is invalid I'd like deno registry to reject invalid code and notify dev deploying this. if my not clear a nought I will rewite it.

elycheikhsmail avatar Jul 29 '21 15:07 elycheikhsmail

Yeah I'm sorry, I'm not 100% clear on what you're asking here? "Broken code" could mean a couple of different things, it could mean that imports and broken, it could mean that there's syntax errors and it doesn't parse in v8, or it could mean a variety of other things. What's the flow you're looking for? What kind of errors do you want the registry to catch and how?

wperron avatar Aug 02 '21 12:08 wperron

Yeah I'm sorry, I'm not 100% clear on what you're asking here? "Broken code" could mean a couple of different things, it could mean that imports and broken, it could mean that there's syntax errors and it doesn't parse in v8, or it could mean a variety of other things. What's the flow you're looking for? What kind of errors do you want the registry to catch and how?

I think he means that you should check if the third party modules is work before publishing them on the Deno registry I think the piece of code below explains what he means 😄

if(checkIsValidThirParty(incomingThirdPartyModule)){
     publishToDenoRegistry(incomingThirdPartyModule)
}else{
     makeReportToModuleOwner(incomingThirdPartyModule)
}

moncefplastin07 avatar Aug 02 '21 13:08 moncefplastin07

Yeah I'm sorry, I'm not 100% clear on what you're asking here? "Broken code" could mean a couple of different things, it could mean that imports and broken, it could mean that there's syntax errors and it doesn't parse in v8, or it could mean a variety of other things. What's the flow you're looking for? What kind of errors do you want the registry to catch and how?

I would assume that broken code means that it is code that won't run. like

functi on ree() {
  return "ree";
}

And if things like this happen then the registry should reject the code.

MierenManz avatar Aug 02 '21 14:08 MierenManz

Yeah I'm sorry, I'm not 100% clear on what you're asking here? "Broken code" could mean a couple of different things, it could mean that imports and broken, it could mean that there's syntax errors and it doesn't parse in v8, or it could mean a variety of other things. What's the flow you're looking for? What kind of errors do you want the registry to catch and how?

thanks for response. essentialy I mean by broken have invalid syntax or import inexisting code at publish time. or code wrtien to work with nodejs only sorry I'm not always online.

elycheikhsmail avatar Aug 11 '21 14:08 elycheikhsmail