https://pantsbuild.org/ logo
#general
Title
# general
c

cold-journalist-66984

01/02/2020, 4:48 PM
I have another project where I’m trying to upgrade the pants version and I’m having some trouble with the config file. I’m upgrading from 1.0.0 to 1.16.0 and I get this error
Copy code
16:45:41 [ERROR] Invalid scope [scala-platform] in /Users/johndowns/src/play-pants/pants.ini
16:45:41 [ERROR] Invalid scope [publish.jar] in /Users/johndowns/src/play-pants/pants.ini
16:45:41 [ERROR] Invalid scope [ivy] in /Users/johndowns/src/play-pants/pants.ini
16:45:41 [ERROR] Invalid scope [jvm-platform] in /Users/johndowns/src/play-pants/pants.ini
I’m fairly certain that
[scala-platfom]
has been renamed to
[scala]
, but when I try to change that header, I get a similar error
16:40:18 [ERROR] Invalid scope [scala] in /Users/johndowns/src/play-pants/pants.ini
This is my
pants.ini
file
Copy code
[GLOBAL]
pants_version: 1.16.0
pythonpath: [
  '%(buildroot)s/build-support'
  ]

backend_packages: [
  'repositories'
  ]

[scala]
version: 2.11

[publish.jar]
repos: {
    'public': {
        'resolver': '<http://oss.sonatype.org|oss.sonatype.org>',
        'auth': ':netrc',
        'help': 'Configure your ~/.netrc',
    }
  }

ivy_settings: %(pants_supportdir)s/ivy/ivysettings_for_publishing.xml

[ivy]
# We need a custom ivy profile to grab the optional pgp libs for
# signing artifacts we publish to maven central.
ivy_profile: %(pants_supportdir)s/ivy/ivy.xml

[jvm-platform]
default_platform: java8
platforms: {
    'java7': {'source': '7', 'target': '7', 'args': [] },
    'java8': {'source': '8', 'target': '8', 'args': [] },
  }
Any idea what I’m missing?
h

hundreds-father-404

01/02/2020, 4:51 PM
Hi, we recommend upgrading one version at a time so that you benefit from deprecation versions. For example, 1.0.0 -> 1.1.0 -> 1.2.0. After every change, run
./pants
and deprecations should print
c

cold-journalist-66984

01/02/2020, 4:52 PM
thanks!
h

hundreds-father-404

01/02/2020, 4:53 PM
Oh also change
backend_packages
to use
+[
instead of
[
. Right now, you’re over-riding the defaults so the JVM backend is getting unregistered.
+[
signals to instead add a new plugin (Thanks for adding your
pants.ini
- super useful for us to help!)
c

cold-journalist-66984

01/02/2020, 5:00 PM
the change to
backend_packages
fixed it, but also thank you for the more general advice!
❤️ 1