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

feat: update to spago@next #122

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

feat: update to spago@next #122

wants to merge 13 commits into from

Conversation

srghma
Copy link

@srghma srghma commented Mar 17, 2024

but right now "spago test --package tidy" doesnt work because of [DuplicateModule] lib/test/snapshots/ModuleHeader.purs

2024-03-17-02pm-53-41-screenshot


UPDATE: fixed this by renaming .purs to .inputpurs

…work because of [DuplicateModule] lib/test/snapshots/ModuleHeader.purs
@srghma
Copy link
Author

srghma commented Aug 15, 2024

@natefaubion

@srghma
Copy link
Author

srghma commented Aug 15, 2024

should be blocked by purescript/registry#494

@srghma
Copy link
Author

srghma commented Oct 13, 2024

ready

@natefaubion
Copy link
Owner

natefaubion commented Oct 13, 2024

Is this not still blocked by monorepo support? I wasn't aware of any resolution to this issue.

@srghma
Copy link
Author

srghma commented Oct 13, 2024

yes, me too, didnt hear, but monorepo is only for those who want to publish, and .... https://pursuit.purescript.org/search?q=Tidy

_ <- liftEffect $ ChildProcess.execSync' "npm install" (_ { cwd = Just tmpPath })

liftEffect $ Console.log $ "running 'spago ls packages --json'"
s <- liftEffect $ Buffer.toString UTF8 =<< Exec.execSync' "spago ls packages --json" (_ { cwd = Just tmpPath })
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous script had an explicit list of core/contrib largely due to these libraries changing very infrequently (and thus a conflict is rare), whereas a full package set is likely to change often. It's unlikely that a new version of tidy is going to be published with every operator change within the package set. I think would prefer not to commit to publishing operators for the full package set.

Copy link
Author

@srghma srghma Oct 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can do spago registry info PACKAGE --json for each package

 /tmp/purs-tidy-generate-default-operators-kxYbzh  spago registry info z3 --json
{
  "location": {
    "githubOwner": "gbagan",
    "githubRepo": "purescript-z3"
  },
  "published": {
    "0.0.1": {
      "bytes": 6777,
      "hash": "sha256-9OoReWVBMDRquMGWR3yG98Xvz9PeMQLT7lFSAfFyH8U=",
      "publishedTime": "2023-05-05T16:45:43.000Z",
      "ref": "v0.0.1"
    },
    "0.0.2": {
      "bytes": 8734,
      "hash": "sha256-smw4c6eVA0AZOltlE1iVYDvD/KQxDjrz47UpZKwHg90=",
      "publishedTime": "2023-05-07T15:55:35.000Z",
      "ref": "v0.0.2"
    }
  },
  "unpublished": {}
}

filter only with githubOwner is purescript-contrib ....etc


#!/usr/bin/env node

const { execSync } = require('child_process');

// Get the package list from `spago ls packages --json`
const packagesJson = execSync('spago ls packages --json').toString();
const packages = JSON.parse(packagesJson);

// Array to store tuples of package names and their GitHub owners
const tuplePackagenameOwner = [];

// Loop through each package in the list
for (const packageName in packages) {
  try {
    // Get registry info for the current package
    const packageInfoJson = execSync(`spago registry info ${packageName} --json`).toString();
    const packageInfo = JSON.parse(packageInfoJson);

    // Extract the githubOwner if it exists
    const githubOwner = packageInfo?.location?.githubOwner || 'unknown';

    // Push tuple (packageName, githubOwner) into the array
    tuplePackagenameOwner.push([packageName, githubOwner]);
  } catch (error) {
    console.error(`Error fetching info for package: ${packageName}`, error.message);
  }
}

// Get unique GitHub owners
const uniqueGithubOwners = [...new Set(tuplePackagenameOwner.map(([, githubOwner]) => githubOwner))];

// Print the unique GitHub owners
console.log('Unique GitHub Owners:');
uniqueGithubOwners.sort().forEach(owner => console.log(owner));
AdaBeat
ConnorDillon
Ebmtranceboy
JordanMartinez
LiamGoodacre
MitchStevens
PureFunctor
Risto-Stevcev
Thimoteus
Unisay
acple
ad-si
ajnsit
albertprz
artemisSystem
athanclark
awakesecurity
bklaric
bodil
cakekindel
cdepillabout
citizennet
collegevine
coot
cprussin
crestonbunch
csicar
deadshot465
deemp
dewey92
easafe
ehrenmurdick
eikooc
ethul
f-f
f-o-a-m
fehrenbach
felixschl
flip111
flounders
garganscript
garyb
gbagan
grybiena
hdgarrood
i-am-the-slime
ilyakooo0
imsaravana369
jacereda
jamieyung
jeslie0
joellefkowitz
joneshf
jordanmartinez
jstoxrocky
justinwoo
kRITZCREEK
katsujukou
klntsky
krisajenkins
kritzcreek
lfarroco
lucasdicioccio
m-bock
m15a
maxdeviant
mcneissue
megamaddu
menelaos
mikesol
mjepronk
mlang
morganthomas
natefaubion
newlandsvalley
njaremko
nonbili
nsaunders
nwolverson
oreshinya
paf31
paluh
paulyoung
pete-murphy
prescientmoon
pujoheadsoft
purescript
purescript-concur
purescript-contrib
purescript-deprecated
purescript-grain
purescript-halogen
purescript-node
purescript-open-community
purescript-react
purescript-spec
purescript-web
qwbarch
rightfold
rnons
robertdp
rowtype-yoga
sharkdp
sigma-andex
sumew
tfc
the-dr-lazy
thomashoneyman
thought2
timdeputter
tonicebrian
truqu
tweag
ursi
userfriendanonymous
vibbits
wintechis
xc-jp
yukikurage

so, only

purescript-contrib
purescript-halogen
purescript-node
purescript-react
purescript-spec
purescript-web

?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously it was only core and contrib. I don't think an upgrade to spago-next should re-evaluate that decision, so I would just go with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants