Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:40:51+00:00 2026-06-10T22:40:51+00:00

Because of an issue with package name aux under Windows, I am moving a

  • 0

Because of an issue with package name aux under Windows, I am moving a helper class within the package hierarchy of my library from

de.sciss.scalainterpreter.aux

to

de.sciss.scalainterpreter

The class is private to the library, i.e. private[scalainterpreter] object Helper.

Now using the Typesafe Migration-Manager, obviously it reports that the change is not compatible:

Found 2 binary incompatibiities
===============================
 * class de.sciss.scalainterpreter.aux.Helper does not have a correspondent
   in new version
 * object de.sciss.scalainterpreter.aux.Helper does not have a correspondent
   in new version

But I suspect that if client code does not call into either object, the interfaces are still compatible, and thus I can use a minor version increase to indicate the change, and allow those two versions to be used interchangeably.

Correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:40:52+00:00Added an answer on June 10, 2026 at 10:40 pm

    It’s easy to see how inlining can break client code, since the inlined code essentially bleeds into the client interface. This example really asks for a linkage error; we can experiment and do things like javap | grep Helper, but at some level you have to let scalac do its job.

    package lib {
    
      object Lib {
        //import util.Helper
        @inline def result = Helper.help
      }
    
      //package util {
    
      private [lib] object Helper {
        @inline def help = "Does this help?"
      }
    //}
    }
    

    Sample innocently bystanding client:

    package client
    
    object Test {
      import lib.Lib
      def main(args: Array[String]) {
        println(Lib.result)
      }
    }
    

    Changing package of package-private class:

    $ scala -cp "classes;target" client.Test
    Does this help?
    
    apm@halyard ~/tmp/taking-it-private
    $ vi lib.scala
    
    apm@halyard ~/tmp/taking-it-private
    $ rm -rf classes/*
    
    apm@halyard ~/tmp/taking-it-private
    $ smalac -d classes -optimise lib.scala 
    
    apm@halyard ~/tmp/taking-it-private
    $ smala -cp "classes;target" client.Test
    java.lang.ClassNotFoundException: lib.util.Helper$
    

    Javap shows why. [Namely, the call is inlined but it still wants to init the module.]

    I haven’t followed the discussions, but for example there are links at:
    https://github.com/scala/scala/pull/1133
    and other discussions on the ML about what expectations about binary compatibility are valid.
    https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/sJ-xnWL_8PE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with importing a picture from the Album in Android, because
Because data from file look like this: line 1 is name (first last), next
I got below JSON string, i facing issue parsing because it contains non english
I assume because the CLR this wouldn't be an issue?
So far I've been chugging along with Parcelable objects without issue, mainly because all
CKeditor in Chrome Extension popup issued: Refused to load frame from 'about:blank' because of
The following code doesn't compile. package varargspkg; public class Main { public static void
I upgraded my microsof-web-helpers package from nuget and it itself depends on facebook and
I have a very odd performance issue with an SSIS package in Sql Server
My company's main software package includes a hefty configuration library which loads on startup.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.